ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Filter Switches vs Macro? (https://www.excelbanter.com/excel-discussion-misc-queries/14839-filter-switches-vs-macro.html)

Ken

Filter Switches vs Macro?
 
Excel 2000 ... I have Filter Switches which I activate
with various recorded Macros (1 Filter Switch per
Macro) ... this is working fine as long as there is not a
Filter Switch already activated.

Above said ... I need a little Macro instruction I can
paste into my recorded Macros that will set any activated
Filter Switches back to ALL before activating the Filter
Switch I am calling for???

This so I do not get multiple Filter Switches activated by
my Macros ... Thanks ... Kha

Gary Brown

Selection.AutoFilter

resets all filters
HTH,
Gary Brown


"Ken" wrote:

Excel 2000 ... I have Filter Switches which I activate
with various recorded Macros (1 Filter Switch per
Macro) ... this is working fine as long as there is not a
Filter Switch already activated.

Above said ... I need a little Macro instruction I can
paste into my recorded Macros that will set any activated
Filter Switches back to ALL before activating the Filter
Switch I am calling for???

This so I do not get multiple Filter Switches activated by
my Macros ... Thanks ... Kha


Ken


-----Original Message-----
Selection.AutoFilter

resets all filters
HTH,
Gary Brown


"Ken" wrote:

Excel 2000 ... I have Filter Switches which I activate
with various recorded Macros (1 Filter Switch per
Macro) ... this is working fine as long as there is not

a
Filter Switch already activated.

Above said ... I need a little Macro instruction I can
paste into my recorded Macros that will set any

activated
Filter Switches back to ALL before activating the

Filter
Switch I am calling for???

This so I do not get multiple Filter Switches activated

by
my Macros ... Thanks ... Kha

.


Dave Peterson

A couple more options:

on error resume next
activesheet.showallData
on error goto 0

or if you want to check yourself:


With ActiveSheet
If .FilterMode Then
.ShowAllData
End If
End With



Ken wrote:

Excel 2000 ... I have Filter Switches which I activate
with various recorded Macros (1 Filter Switch per
Macro) ... this is working fine as long as there is not a
Filter Switch already activated.

Above said ... I need a little Macro instruction I can
paste into my recorded Macros that will set any activated
Filter Switches back to ALL before activating the Filter
Switch I am calling for???

This so I do not get multiple Filter Switches activated by
my Macros ... Thanks ... Kha


--

Dave Peterson


All times are GMT +1. The time now is 12:40 PM.

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