GroupLevel Property Example

This example displays a message box if the field that contains the active cell is the highest-level parent field.

Worksheets("Sheet1").Activate
If ActiveCell.PivotField.GroupLevel = 1 Then
    MsgBox "This is the highest-level parent field."
End If