MemberProperties Property

Microsoft Office Web Components Object Model

Show All

MemberProperties Property

       

MemberProperties property as it applies to the PivotField object.

Returns a PivotMemberProperties object that represents the OLAP member properties for the specified PivotTable field.

expression.MemberProperties

expression   Required. An expression that returns a PivotField object.

 

MemberProperties property as it applies to the PivotAxisMember, PivotColumnMember, PivotPageMember, and PivotRowMember objects.

Returns a PivotResultMemberProperties object that represents the OLAP member properties for the specified PivotTable field.

expression.MemberProperties

expression   Required. An expression that returns one of the above objects.

 

Example

As it applies to the PivotField object.

This example displays the member properties for the Store Name field set.

Sub Display_MemberProperties()

 Dim ptView
 Dim ptConstants
 Dim fldStoreName

 Set ptConstants = PivotTable1.Constants

 ' Set a variable to the active view of the PivotTable.
 Set ptView = PivotTable1.ActiveView

 ' Set a variable to the Store Name field.
 Set fldStoreName = ptView.FieldSets("Store").Fields("Store Name")

 ' The following three lines of code specify that the member properties are
 ' displayed in the PivotTable list.
 fldStoreName.MemberProperties("Store Manager").DisplayIn = ptConstants.plDisplayPropertyInReport
 fldStoreName.MemberProperties("Store Type").DisplayIn = ptConstants.plDisplayPropertyInReport
 fldStoreName.MemberProperties("Store Sqft").DisplayIn = ptConstants.plDisplayPropertyInReport

 ' The following three lines of code set the caption for the member properties.
 fldStoreName.MemberProperties("Store Manager").Caption = "Manager Name"
 fldStoreName.MemberProperties("Store Type").Caption = "Store Type"
 fldStoreName.MemberProperties("Store Sqft").Caption = "Size in SQFT"

End Sub