Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter
Hi all.
Is there some way to determine if the autofilter is on? I have a button to display all data, but i want to exit the sub if the data is not filtered. Hope you understand what i'm trying to say. Thanx in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter
LD,
Sub testit() If Not Worksheets(1).AutoFilterMode Then Exit Sub MsgBox "Autofilter is active" End Sub Rob "LD" wrote in message ... Hi all. Is there some way to determine if the autofilter is on? I have a button to display all data, but i want to exit the sub if the data is not filtered. Hope you understand what i'm trying to say. Thanx in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter
Sorry for not explaining it very well.
The autofilter is always on. ..EnableAutoFilter = True I want to test if the data in the list is filtered or not. Thanx again. "LD" wrote in message ... Hi all. Is there some way to determine if the autofilter is on? I have a button to display all data, but i want to exit the sub if the data is not filtered. Hope you understand what i'm trying to say. Thanx in advance. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter
This previous posting by Colo may help:
http://groups.google.co.nz/groups?hl...rum-nospam.com "LD" wrote in message ... Sorry for not explaining it very well. The autofilter is always on. .EnableAutoFilter = True I want to test if the data in the list is filtered or not. Thanx again. "LD" wrote in message ... Hi all. Is there some way to determine if the autofilter is on? I have a button to display all data, but i want to exit the sub if the data is not filtered. Hope you understand what i'm trying to say. Thanx in advance. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter
If Not ActiveSheet.AutoFilterMode Then Exit Sub
Leo On Fri, 2 Jan 2004 11:21:31 +0200, "LD" wrote: Hi all. Is there some way to determine if the autofilter is on? I have a button to display all data, but i want to exit the sub if the data is not filtered. Hope you understand what i'm trying to say. Thanx in advance. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter
One way:
with activesheet If .AutoFilterMode Then If .FilterMode Then .ShowAllData End If end if end with another way is to just ignore the error: on error resume next activesheet.showalldata on error goto 0 ========= I'm not sure what you're using this for, but if it's a generic macro in your personal.xls (say), you might find just adding a button to your favorite toolbar is easier to run. Tools|Customize|Commands Tab|Data Category I've dragged both the "autofilter" and "show all" buttons to a customized toolbar so that I can get to them more quickly than "data|filter|show all". LD wrote: Hi all. Is there some way to determine if the autofilter is on? I have a button to display all data, but i want to exit the sub if the data is not filtered. Hope you understand what i'm trying to say. Thanx in advance. -- Dave Peterson |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter
if ActiveSheet.FilterMode then
msgbox "Data is filtered" End if From help on FilterMode This property is True if the worksheet contains a filtered list in which there are hidden rows. -- Regards, Tom Ogilvy LD wrote in message ... Sorry for not explaining it very well. The autofilter is always on. .EnableAutoFilter = True I want to test if the data in the list is filtered or not. Thanx again. "LD" wrote in message ... Hi all. Is there some way to determine if the autofilter is on? I have a button to display all data, but i want to exit the sub if the data is not filtered. Hope you understand what i'm trying to say. Thanx in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel 2007 autofilter change to 2003 autofilter functionality? | Excel Discussion (Misc queries) | |||
2007 excel autofilter back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
2007 excel autofilter change back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
2007 Autofilter worse than 2003 Autofilter | Excel Discussion (Misc queries) | |||
How to Sort within AutoFilter with Protection on (and AutoFilter . | Excel Discussion (Misc queries) |