Cancelling AutoFilter in a macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Need help with macro code that will clear all of the active filter opions on the auto filter.
I tryied taking out the filter and putting back with instructions hoping that after taking it out, all prior filter choices would be wiped clean. But that doesnot seem to always work, as when the filter is reactivated (Application.AutoFilter) prior filters are still active.

Thank you in advance.
Floss
 
Floss,

You can cancel Autofilter with

rng.Autofilter

Is this what you mean?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Floss said:
Hi,

Need help with macro code that will clear all of the active filter opions on the auto filter.
I tryied taking out the filter and putting back with instructions hoping
that after taking it out, all prior filter choices would be wiped clean. But
that doesnot seem to always work, as when the filter is reactivated
(Application.AutoFilter) prior filters are still active.
 
with activesheet
if .filtermode then
.showalldata
end if
end with

to show all the data.

Or

activesheet.autofiltermode = false
to remove all the dropdown arrows.
 

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

Back
Top