bvanscoy678
Member
Hello,
I have place this code into the sheet name that contains my pivot table, but I can see it is skipping to loop. Not sure if it is because I am using Excel 2003 with this project. My goal is to have the pivot table(s) refresh in the worksheet when the user activates the worksheet to view the pivots.
Private Sub Worksheet_Activate()
Dim pc As ChartObject
For Each pc In Me.ChartObjects
pc.Chart.PivotLayout.PivotTable.RefreshTable
Next pc
End Sub
Thanks for any help.
I have place this code into the sheet name that contains my pivot table, but I can see it is skipping to loop. Not sure if it is because I am using Excel 2003 with this project. My goal is to have the pivot table(s) refresh in the worksheet when the user activates the worksheet to view the pivots.
Private Sub Worksheet_Activate()
Dim pc As ChartObject
For Each pc In Me.ChartObjects
pc.Chart.PivotLayout.PivotTable.RefreshTable
Next pc
End Sub
Thanks for any help.