ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cancelling AutoFilter in a macro (https://www.excelbanter.com/excel-programming/303245-cancelling-autofilter-macro.html)

floss

Cancelling AutoFilter in a macro
 
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

Bob Phillips[_6_]

Cancelling AutoFilter in a macro
 
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" wrote in message
...
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




Dave Peterson[_3_]

Cancelling AutoFilter in a macro
 
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.

Floss wrote:

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


--

Dave Peterson


BOSS

Cancelling AutoFilter in a macro
 
Excellent..
Dave us Gr8..!

Thansks!
Boss

"Dave Peterson" wrote:

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.

Floss wrote:

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


--

Dave Peterson




All times are GMT +1. The time now is 04:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com