Compartilhar via


PivotField.UseMemberPropertyAsCaption Property

This property is used to control whether member property captions are used for PivotItem captions of the PivotField(). Read/write.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Property UseMemberPropertyAsCaption As Boolean
    Get
    Set
'Usage
Dim instance As PivotField
Dim value As Boolean

value = instance.UseMemberPropertyAsCaption

instance.UseMemberPropertyAsCaption = value
bool UseMemberPropertyAsCaption { get; set; }

Property Value

Type: System.Boolean
Boolean

Remarks

If UseMemberPropertyAsCaption is set to True for a PivotField(), then UseMemberPropertyAsCaption specifies which member property caption to display. If none is specified, the first member property of that PivotField() (in data source order) will be displayed as the caption for items of that PivotField().

If UseMemberPropertyAsCaption is set to False, then the regular PivotItem captions are used for the PivotField().

If you try to set UseMemberPropertyAsCaption to True for a PivotField() with no member properties, a run-time error is returned. For **PivotField()**s with no member properties, the property will always be False.

See Also

Reference

PivotField Interface

PivotField Members

Microsoft.Office.Interop.Excel Namespace