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

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
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,214,561
Messages
6,120,231
Members
448,951
Latest member
jennlynn

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