Ok so I found a code that ALMOST works, problem is idk the syntax for changing the report filter, because as of right now it will only work if the date is part of the Rows or Columns, and not the report filter
Sub PivotTableFilter4()
Dim PvtTbl As PivotTable
Set PvtTbl = Worksheets("Pivot").PivotTables("PivotTable1")
'delete all filters currently applied to the PivotTable, using the PivotTable.ClearAllFilters Method
PvtTbl.ClearAllFilters
PvtTbl.PivotFields("Dates").PivotFilters.Add Type:=xlDateBetween, Value1:="3/14/2014", Value2:="3/19/2014"
End Sub
I believe it has something to do with "PivotFilters" portion but I am not sure...
Thank you!
Bookmarks