MrExcel Publishing
Your One Stop for Excel Tips & Solutions

macro advanced filter / remove advanced filter

Posted by mabaud on July 15, 2001 11:41 PM

I recorded a macro to do an "advanced filter" and an other one to remove the filter (show all). If the filter is not "on", when I run the "show all" macro; the system sends an error message.
Is there a way to test wether the filter is "on" or not?
thanks for your help

Posted by Dax on July 16, 2001 3:05 AM

You could check the Filtermode property to see whether or not the sheet is in filter mode. i.e.

Sub ShowAll()
If ActiveSheet.FilterMode = True Then
End If
End Sub