Prevent A Macro From Running If SpreadSheet is Filtered

G

Guest

I've been using macro that does not work well if I happen to have some of the
columns filtered (it works fine if auto filter is on but no columns are
actually filtered).

Is there a way to prevent the macro from running (and maybe displaying a
prompt that says "unfilter"). After the prompt I do not want the macro to
continue. I would then manually start it after unfiltering the columns.

Thank you in advance.
 
R

Ron de Bruin

Hi Carl

In your macro you can use this to test if the filter is on

If ActiveSheet.FilterMode Then
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top