#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default hiden sheet

I have a hidden sheet and depending on the order of when
other macros have been ran, the sheet may or may not be
autofiltered. I need a code that will look at the hidden
sheet and turn off the autofilter if it is on and not do
anything if it is not.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default hiden sheet

If ActiveSheet.AutofilterMode then activesheet.usedrange.autofilter

Robert Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel


"scrabtree" wrote in message
...
I have a hidden sheet and depending on the order of when
other macros have been ran, the sheet may or may not be
autofiltered. I need a code that will look at the hidden
sheet and turn off the autofilter if it is on and not do
anything if it is not.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default hiden sheet

Slightly different:

If worksheets("hiddensheetname").AutofilterMode then _
worksheets("hiddensheetname").AutofilterMode = False

--
Regards,
Tom Ogilvy


"scrabtree" wrote in message
...
I have a hidden sheet and depending on the order of when
other macros have been ran, the sheet may or may not be
autofiltered. I need a code that will look at the hidden
sheet and turn off the autofilter if it is on and not do
anything if it is not.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default hiden sheet

and I add an other detail:
(if you do not want the whole used range to be autofiltered)


with range("A1:A10") ' put here the head of wanted colmuns

' this deactivate it if already used ANYWHERE ON THIS SHEET:
If .AutoFilter Then: .AutoFilter ' (when no arguments, just toggle)

' this activate it on the right cells:
..AutoFilter 1, , , , True

end with


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
how can I find A column when it's hiden? sophie Excel Worksheet Functions 2 March 29th 07 01:49 PM
Hyperlink to hiden sheets Mick Excel Worksheet Functions 3 December 22nd 06 12:14 AM
Getting Back Hiden Columns Marilyn Excel Discussion (Misc queries) 9 October 30th 06 09:24 PM
Printing Hiden Pages Slave2Six Excel Discussion (Misc queries) 0 August 1st 06 11:16 PM
Why can't I unhide a hiden row JBurke Excel Discussion (Misc queries) 7 January 8th 05 03:59 PM


All times are GMT +1. The time now is 06:00 PM.

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

About Us

"It's about Microsoft Excel"