Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default Autofilter detection

Hi all,

I was wondering if there is a way to detect if autofilter is on. I just
want to see if it is select. I don't need to know if it is filtered on a
list.
I trie to looking into the autofilter method/properties, but Id doesn't
appear to true/false state to indicate whether or not it is on.

I just want a way to programmatically check to see if the way I can check it
through the menu: Data-Filter-Autofilter. I just want to check to see if
the check is on, ie, if it is on. Thanks for your help in advance.

Ben

--

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Autofilter detection

Use code like the following:

Debug.Print ActiveSheet.AutoFilterMode




--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Ben" wrote in message
...
Hi all,

I was wondering if there is a way to detect if autofilter is
on. I just
want to see if it is select. I don't need to know if it is
filtered on a
list.
I trie to looking into the autofilter method/properties, but Id
doesn't
appear to true/false state to indicate whether or not it is on.

I just want a way to programmatically check to see if the way I
can check it
through the menu: Data-Filter-Autofilter. I just want to
check to see if
the check is on, ie, if it is on. Thanks for your help in
advance.

Ben

--



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Autofilter detection

Hi Ben

You can use
ActiveSheet.AutoFilterMode

See Debra's site for more info
http://www.contextures.com/xlautofilter03.html



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ben" wrote in message ...
Hi all,

I was wondering if there is a way to detect if autofilter is on. I just
want to see if it is select. I don't need to know if it is filtered on a
list.
I trie to looking into the autofilter method/properties, but Id doesn't
appear to true/false state to indicate whether or not it is on.

I just want a way to programmatically check to see if the way I can check it
through the menu: Data-Filter-Autofilter. I just want to check to see if
the check is on, ie, if it is on. Thanks for your help in advance.

Ben

--



  #4   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default Autofilter detection

Thanks Chip and Ron.

Ben

--



"Ben" wrote:

Hi all,

I was wondering if there is a way to detect if autofilter is on. I just
want to see if it is select. I don't need to know if it is filtered on a
list.
I trie to looking into the autofilter method/properties, but Id doesn't
appear to true/false state to indicate whether or not it is on.

I just want a way to programmatically check to see if the way I can check it
through the menu: Data-Filter-Autofilter. I just want to check to see if
the check is on, ie, if it is on. Thanks for your help in advance.

Ben

--

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Autofilter detection

AutoFilter Property
See AlsoApplies ToExampleSpecificsReturns an AutoFilter object if filtering
is on. Returns Nothing if filtering is off. Read-only.

Remarks
To create an AutoFilter object for a worksheet, you must turn autofiltering
on for a range on the worksheet either manually or using the AutoFilter
method of the Range object.

Example
The following example sets a variable to the value of the Criteria1 property
of the filter for the first column in the filtered range on the Crew
worksheet.

With Worksheets("Crew")
If .AutoFilterMode Then
With .AutoFilter.Filters(1)
If .On Then c1 = .Criteria1
End With
End If
End With



"Ben" wrote:

Hi all,

I was wondering if there is a way to detect if autofilter is on. I just
want to see if it is select. I don't need to know if it is filtered on a
list.
I trie to looking into the autofilter method/properties, but Id doesn't
appear to true/false state to indicate whether or not it is on.

I just want a way to programmatically check to see if the way I can check it
through the menu: Data-Filter-Autofilter. I just want to check to see if
the check is on, ie, if it is on. Thanks for your help in advance.

Ben

--

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL detection brucelim80[_2_] Excel Programming 3 March 10th 06 07:37 AM
Right click detection broogle Excel Programming 1 January 25th 05 10:10 AM
Hidden Row Detection Nigel[_7_] Excel Programming 1 January 20th 05 03:13 PM
add-in detection romes1 Excel Programming 2 November 2nd 04 11:59 PM
on press detection Fraggs[_17_] Excel Programming 1 June 7th 04 03:26 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"