View Single Post
Old 03-25-2020, 06:56 PM
Peterson Peterson is offline Windows 10 Office 2016
Advanced Beginner
Join Date: Jan 2017
Posts: 41
Peterson is on a distinguished road
Default Auto-refresh pivot table without losing undo buffer

I'm trying to auto-refresh a pivot table, with the following 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?
Reply With Quote