Mighty1072
asked on
Auto Filter Macro Help - Rewrite code
I have a code below that remove auto filter. But I wrote the code incorrectly.
Please help rewrite it. The purpose of the code is: if the sheet has auto filter then turn it off.
THanks,
Please help rewrite it. The purpose of the code is: if the sheet has auto filter then turn it off.
THanks,
Sub FilterOff()
'XXXXX Turn off auto filter XXXXXXXXXX
Dim ws As Worksheet
ws = ActiveWorkbook.Worksheets
If ws.Worksheets.AutoFilterMode Then Selection.AutoFilter
'xXXX Turn off auto filter XXXXXXXXXXXXXXXX
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
work great!!!! Thanks,
Glad to help
Chris
Chris
For all sheets it would be more like:
chris_bottomley
Open in new window