wakerider017
Board Regular
- Joined
- Jun 10, 2015
- Messages
- 77
Exactly what the thread title says.
I want to copy the pivot filters from PivotTable1 to all other pivot tables on the sheet with matching filter titles.
I want this to occur after the click of a button.
I found this code on Contextures from Jeff Weir, but it is not working for me. Any ideas?
I want to copy the pivot filters from PivotTable1 to all other pivot tables on the sheet with matching filter titles.
I want this to occur after the click of a button.
I found this code on Contextures from Jeff Weir, but it is not working for me. Any ideas?
Code:
[SIZE=2][FONT=arial][COLOR=#1A1A1A]Sub SetToAll()[/COLOR]
[COLOR=#1A1A1A]Dim pt As PivotTable[/COLOR]
[COLOR=#1A1A1A]Dim pf As PivotField[/COLOR]
[COLOR=#1A1A1A]Set pt = ActiveSheet.PivotTables(1)[/COLOR]
[COLOR=#1A1A1A]For Each pf In pt.PivotFields[/COLOR]
[COLOR=#1A1A1A]pf.ClearAllFilters[/COLOR]
[COLOR=#1A1A1A]Next[/COLOR]
[COLOR=#1A1A1A]End Sub[/COLOR][/FONT][/SIZE]
Last edited: