ViewCalculatedMembers Property

Microsoft Excel Visual Basic

Show All

ViewCalculatedMembers Property

       

When set to True (default), calculated members for Online Analytical Processing (OLAP) PivotTables can be viewed. Read/write Boolean.

expression.ViewCalculatedMembers

expression   Required. An expression that returns a PivotTable object.

Example

This example determines if calculated members can be viewed on the PivotTable and notifies the user. It assumes that a PivotTable exists on the active worksheet.

Sub CheckViewCalculatedMembers()

    Dim pvtTable As PivotTable

    Set pvtTable = ActiveSheet.PivotTables(1)

    ' Determine if calculated members can be viewed.
    If pvtTable.ViewCalculatedMembers = True Then
        MsgBox "Calculated members can be viewed."
    Else
        MsgBox "Calculated members cannot be viewed."
    End If

End Sub