I'm trying to sort through each table within each worksheet in an active workbook and reset all the filters.
Note that each table is a pivot table.
Sub ResetFilters()
Dim ws As Worksheet
Dim wb As Workbook
Dim listObj As ListObjects
For Each ws In ActiveWorkbook.Worksheets
For Each listObj In ws
With ActiveSheet.listObj.Sort.SortFields.Clear
End With
Next listObj
Next ws
End Sub
Error received: "Object doesn't suppor this property or method" on Line 7.
This worked for with a small change to the previous answer. Just use the ShowAutoFilter property instead of ShowHeaders. ShowAutoFilter is the property that references the these things: Screencap of AutoFilter Dropdown Box in Excel Table
(I would have just commented on the other answer, but I need 50 "reputation" -_- )
7-line solution This will show all data without removing the filter, and won't fail on unfiltered sheets.
The poster's VBA might have failed on encountering an unfiltered sheet.
To remove each filter entirely, just replace lines 4+5 with
Cells.AutoFilter
.Assuming you mean clear filters and remove sorting, you can use: