Greetings-
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:
I even tried recording the macro and running it directly from that and I still get the same error. Any help would be appreciated.
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"
intRow = intRow + 1
varUnit = shtLists.Range("U" & intRow)
Loop
Comment