Dear Excel Experts,
I found many sets of macros to clear all filters in a workbook. I've tried 4 of them but all doesn't seem to work. The filter still exists altho no error when running the macro. Below is one of the codes I tried.
Is there anything I did wrong? Please help because I need to do this for 80 worksheets in each workbook with total 95 workbooks.
Thank you in advance.
DZ
I found many sets of macros to clear all filters in a workbook. I've tried 4 of them but all doesn't seem to work. The filter still exists altho no error when running the macro. Below is one of the codes I tried.
Is there anything I did wrong? Please help because I need to do this for 80 worksheets in each workbook with total 95 workbooks.
Code:
Sub AutoFiltersOff()
Dim Wks As Worksheet
For Each Wks In Worksheets
If Wks.AutoFilterMode = True Then
Wks.UsedRange.AutoFilter
End If
Next Wks
End Sub
Thank you in advance.
DZ