TotalLevels Property Example

This example displays the total number of fields in the group that contains the active cell.

Worksheets("Sheet1").Activate
MsgBox "This group has " & _
    ActiveCell.PivotField.TotalLevels & " levels."