Hi all,
All I want to do is put in a line or two of code that starts my macro out by clearing all existing filters on the pivot table. I've figured out how to clear the filters that are in the 'filter' field, but I cannot figure out how to clear the filters that are on my row headers.
I've tried the code below to no avail.
Thisworkbook.worksheets("sheet1").PivotTables("pivottable1").pivotfields("x").clearallfilters
When I record and look at the code... this is what it gives me in VBA...
ActiveSheet.Range("$A$30:$C$17356").AutoFilter Field:=1
When I try to rerun only this portion of the recorded macro, it gives me an error. Autofilter Method of Range Class failed.
What could be the issue?
Thank you,
Savetime
Bookmarks