ViewChange Event

                  Applies To

Occurs whenever the user opens a different PivotTable list or changes the spreadsheet view.

Syntax 1 (PivotTable object)

Private Sub PivotTable_ViewChange(Reason As PivotViewReasonEnum)

Reason   The PivotViewReasonEnum constant that indicates how the view was changed.

Syntax 2 (Spreadsheet object)

Private Sub Spreadsheet_ViewChange(SpreadsheetEventInfo As SpreadsheetEventInfo)

SpreadsheetEventInfo   The SpreadsheetEventInfo object that contains information about the event.

Remarks

For information about using events with VBScript, see Declaring and Using Event Procedures in VBScript.


Send feedback to MSDN.Look here for MSDN Online resources.