expression.MemberPropertiesOrder
expression Required. An expression that returns a PivotField object.
Remarks
The array that you pass to this property can contain a list of PivotMemberProperty objects or a String list of member captions.
Example
This example enables the member captions for the Store Name field in PivotTable1. Then, the member captions are rearranged, and their captions are customized.
Sub Format_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
fldStoreName.MemberPropertiesOrder = Array("Store Type", "Store Sqft", "Store Manager")
' 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