JackDanIce
Well-known Member
- Joined
- Feb 3, 2010
- Messages
- 9,922
- Office Version
- 365
- Platform
- Windows
Hi,
I have a workbook that I paste data into 5 sheets and have another sheet that contains several pivot tables that relate to these 5 sheets.
I'm using the following code (part of the overal procedure) to refresh the pivot tables. This works fine, however, the filters I previously had applied seem to reset themselves:
I've not been able to find online any code that will refresh the pivot tables but retain the applied filters. Does anyone know how to achieve this?
Thanks in advance,
Jack
I have a workbook that I paste data into 5 sheets and have another sheet that contains several pivot tables that relate to these 5 sheets.
I'm using the following code (part of the overal procedure) to refresh the pivot tables. This works fine, however, the filters I previously had applied seem to reset themselves:
Code:
With wkbk 'Main workbook used in my procedure
.RefreshAll
For Each pPivotTable In .Sheets("Pivots").PivotTables
With pPivotTable
.RefreshTable
.Update
End With
Next pPivotTable
.RefreshAll
End With
Thanks in advance,
Jack