Trigger running Macro on updating Pivot Table

Ken_Star

New Member
Joined
Apr 30, 2016
Messages
3
Is it possible to trigger a macro to run when I update a pivot table? I am running Excel 2016. I did do a search but can't find any information on this.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Have you looked at the various pivot table sheet events?

For example Worksheet_PivotTableAfterValueChange and Worksheet_PivotTableUpdate?
 
Upvote 0
Thanks Norie.

I am a novice in terms of VBA. Do I create a procedure like the following and call my procedure where the message box is?

Code:
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable) 
 
 MsgBox "The PivotTable connection has been updated." 
 
End Sub
 
Upvote 0
My macro is creating a an x-y scatter chart from the pivot table data. Unfortunately this type of chart isn't available as a pivot chart as far as I know. So I want the chart to update every time I refresh the pivot table.
 
Upvote 0

Forum statistics

Threads
1,215,308
Messages
6,124,173
Members
449,146
Latest member
el_gazar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top