I have a Pivot Chart attached to a Pivot Table. I created a macro to loop through the workbook and refresh all pivot tables. I do this whenever I change some settings that change values in the source table and all the pivot-things need to update.
Yesterday, no problem, changes and refreshes proceeded along with no issues whatsoever.
Here's the code:
I saved the color scheme/type of chart as a custom type, so at least now when it resets I can go back and reapply. And I'm going to record a macro in a sec so I can add that to the code to simply reapply the template (I assume this can be coded) whenever I hit the update.
But, a few questions:
1. Why is this happening now and it wasn't yesterday? And it's only happening to one of the pivot charts.
2. Is there a way to prevent this from happening?
Thanks!!
Matt
Yesterday, no problem, changes and refreshes proceeded along with no issues whatsoever.
Here's the code:
Code:
Private Sub Update_Pivot_Click()
Dim wks As Worksheet
Dim pvt As PivotTable
For Each wks In Worksheets
For Each pvt In wks.PivotTables
pvt.RefreshTable
Next pvt
Next wks
End Sub
I saved the color scheme/type of chart as a custom type, so at least now when it resets I can go back and reapply. And I'm going to record a macro in a sec so I can add that to the code to simply reapply the template (I assume this can be coded) whenever I hit the update.
But, a few questions:
1. Why is this happening now and it wasn't yesterday? And it's only happening to one of the pivot charts.
2. Is there a way to prevent this from happening?
Thanks!!
Matt