CubeField.AddMemberPropertyField procedure builder

CubeField.AddMemberPropertyField (Excel)

Adds a member property field to the display for the cube field.

The property field specified will not be viewable if the PivotTable view has no fields. To delete member properties, use the Delete method to delete the PivotField object from the PivotFields collection.

AddMemberPropertyField (Property, PropertyOrder, PropertyDisplayedIn)

Set pvtTable = ActiveSheet.PivotTables(1) 
 With pvtTable 
 .ManualUpdate = True 
 .CubeFields("[Country]").LayoutForm = xlOutline 
 .CubeFields("[Country]").AddMemberPropertyField _ 
 Property:="[Country].[Area].[Description]" 
 .ManualUpdate = False 
 End With

Arguments

The following argument is required

Property (String) - The unique name of the member property. For balanced hierarchies, a unique name can be created by appending the "quoted" member property name to the unique name of the level with which the member property is associated. For unbalanced hierarchies, a unique name can be created by appending the "quoted" member property name to the unique name of the hierarchy.

Optional arguments

The following arguments are optional

PropertyOrder (Long) - Sets the PropertyOrder property value for a CubeField object. The actual position in the collection will be immediately before the PivotTable field that currently has the same PropertyOrder value that is given in the argument. If no field has the given PropertyOrder value, the range of acceptable values is 1 to the number of member properties already showing for the hierarchy plus one. This argument is one-based. If omitted, the property goes to the end of the list.

PropertyDisplayedIn (XlPropertyDisplayedIn) - Specifies where to display the property. If this argument is omitted, the member property field will be added to the PivotTable only.

Possible Values are xlDisplayPropertyInPivotTable - Displays member property in the PivotTable only. This is the default value, xlDisplayPropertyInPivotTableAndTooltip - Displays member property in the tooltip only, xlDisplayPropertyInTooltip - Displays member property in both the tooltip and the PivotTable.