ExpandDetails Property

Microsoft Office Web Components Visual Basic

constant that represents whether or not fields are expanded when added to the detail area of a PivotTable list. Read/write.

expression.ExpandDetails

expression    Required. An expression that returns a PivotView object.

Example

This example sets PivotTable1 so that fields are never expanded when they are added to the PivotTable list.

Sub NeverExpand()
    Dim pvtView
    Dim ptConstants

    Set ptConstants = PivotTable1.Constants

    ' Set a variable to the active view.
    Set pvtView = PivotTable1.ActiveView

    ' Always expand fields when they are added
    ' to a PivotTable list.
    pvtView.ExpandMembers = ptConstants.plExpandNever

    ' Always expand fields when they are added
    ' to the detail area PivotTable list.
    pvtView.ExpandDetails = ptConstants.plExpandNever
End Sub