I have AutoFilter turned on in my spreadsheet and am trying to set the criteria through VBA, but I'm continuing to get a method error. Here's the snippet of code:
Code:
Do While varUnit <> ""
pvtResults.PivotFields("Unit Name").CurrentPage = varUnit
shtPivot.ShowAllData
shtPivot.Range("B12:I352").AutoFilter Field:=8, Criteria1:="<>0"
Leave a comment: