Hey there,
So I have a pivot table where the "Date" field is used as the report header to filter the entire table.
I am aware that I can use the following to select specific dates or items from the availabe list:
ActiveSheet.PivotTables("PivotTable1").PivotFields("Date").CurrentPage = _
"(All)"
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Date")
.PivotItems("6/25/2014").Visible = True
.PivotItems("6/27/2014").Visible = False
End With
However, this will require that I force a loop that redefines those visible dates each time the macro is run. Given that we will always be looking for all dates with a fixed range (14th of last month to 15th of this month), can I use something like the xlDateBetween argument to ask Excel to filter on all dates in a given range?
Thanks for your advice.