Syntax
Private Sub Workbook_SheetPivotTableUpdate(ByVal Sh
As Object, ByVal Target
As PivotTable)
Enter code here
End Sub
This event will run code when a
user updates a pivot table within any worksheet in this specific workbook. This
event occurs after the Worksheet PivotTableUpdate Event for the worksheet that
contains the pivot table that is updated.
Required Parameters:
Sh
The sh parameter returns the worksheet that contains the updated
pivot table. This parameter returns a Worksheet object to allow users to
manipulate the events, methods and properties.
Example
Private Sub Workbook_SheetPivotTableUpdate(ByVal Sh
As Object, ByVal Target
As PivotTable)
MsgBox Target.Name & " in " & Sh.Name &
" has been updated."
End Sub
Result
The example will pop up a message box with showing the user that
the pivot table has been updated with the name of the worksheet that contains
the pivot table.