Occurs whenever the user makes a new selection. The user cannot cancel this event.
Private Sub Object_SelectionChange(**** )
For information about using events with VBScript, see Declaring and Using Event Procedures in VBScript .
You can use the Selection property to determine the object type of the current selection, as shown in the following example.
Private Sub PivotTable_SelectionChange() If TypeName(PivotTable.Selection) = "PivotTotal" Then 'Handle selection of a total here End If End Sub