expression.PropertyOrder
expression Required. An expression that returns a PivotField object.
Remarks
If the IsMemberProperty property is False, using the PropertyOrder property will create a run-time error.
Example
This example determines if there are member properties in the fourth field and, if there are, displays the position of the member properties. Depending on the findings, Excel notifies the user. This example assumes that a PivotTable exists on the active worksheet and that it is based on an Online Analytical Processing (OLAP) data source.
Sub CheckPropertyOrder()
Dim pvtTable As PivotTable
Dim pvtField As PivotField
Set pvtTable = ActiveSheet.PivotTables(1)
Set pvtField = pvtTable.PivotFields(4)
' Check for member properties and notify user.
If pvtField.IsMemberProperty = False Then
MsgBox "No member properties present."
Else
MsgBox "The property order of the members is: " & _
pvtField.PropertyOrder
End If
End Sub