Hi All,
I am trying to update all pivots with the extra function that it updates the column filter as well. Up till now I have the following code:
The problem occurs when I am Clearing all filters ("PT.Clearallfilters") and I am a bit stuck how to solve this problem.PHP Code:
Sub RefreshAllPivotTables()
Dim PT As PivotTable
Dim WS As Worksheet
For Each WS In ThisWorkbook.Worksheets
For Each PT In WS.PivotTables
PT.RefreshTable
PT.ClearAllFilters
PT.pivotfiels("Year Week").PivotFilters.Add Type:=xlCaptionIsBetween, Value1:="201501", Value2:="201552"
Next PT
Next WS
End Sub
I would be pleased if someone has the solution for this problem.
Thanks in advanced,
Cheers, Jeroen
Bookmarks