LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Snakeoids
 
Posts: n/a
Default Auto Filter Macro

Greetings,
I have created a button on a worksheet with the following code:
Sub Macro4()
ActiveSheet.ShowAllData
End Sub

When I have the Autofilter active for a column(s), I just press this button
and the filter is taken off. No problems. However if I press the button
when the Autofilter is not filtering any of the columns, I get a debug error.
How do I tell the computer that if I press the button while the Autofilter
is already off, don't do anything? Thanks.
 
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
Macro for Filter Switches ... Maybe??? Ken Excel Discussion (Misc queries) 4 February 25th 05 05:30 PM
Filter Switches vs Macro? Ken Excel Discussion (Misc queries) 3 February 24th 05 10:31 PM
auto filter question Juco Excel Worksheet Functions 0 November 29th 04 02:48 PM
The Auto Filter button lost the column specified option. D Excel Worksheet Functions 1 November 4th 04 11:47 PM
Why can't my macro use Auto Filter when I told the Sheet Protecti. KC Rippstein Excel Worksheet Functions 1 October 28th 04 06:13 PM


All times are GMT +1. The time now is 10:58 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"