I'm trying to auto-refresh a pivot table, with the following code:
Code:
Private Sub Worksheet_Activate()
Worksheets("Daily Totals Pivot Table").PivotTables("PivotTable4").PivotCache.Refresh
End Sub
When I modify the data table, the macro dutifully refreshes the pivot table, but the undo buffer is cleared.
Is there a way to auto-refresh the pivot table such that the undo buffer is not deleted?