Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
carl
 
Posts: n/a
Default Prevent A Macro From Running If SpreadSheet is Filtered

I've been using macro that does not work well if I happen to have some of the
columns filtered (it works fine if auto filter is on but no columns are
actually filtered).

Is there a way to prevent the macro from running (and maybe displaying a
prompt that says "unfilter"). After the prompt I do not want the macro to
continue. I would then manually start it after unfiltering the columns.

Thank you in advance.
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi Carl

In your macro you can use this to test if the filter is on

If ActiveSheet.FilterMode Then




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


"carl" wrote in message ...
I've been using macro that does not work well if I happen to have some of the
columns filtered (it works fine if auto filter is on but no columns are
actually filtered).

Is there a way to prevent the macro from running (and maybe displaying a
prompt that says "unfilter"). After the prompt I do not want the macro to
continue. I would then manually start it after unfiltering the columns.

Thank you in advance.



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
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
automatically running a macro 42410 Excel Discussion (Misc queries) 2 April 26th 05 03:10 PM
Running a VBA Macro Jeff Excel Discussion (Misc queries) 2 March 15th 05 02:13 PM
Is there a way to insert a formula, password or macro in an excel spreadsheet that will automatically delete the spreadsheet? oil_driller Excel Discussion (Misc queries) 1 February 8th 05 09:34 AM
running totals in a macro for each month idunnobutheregoes Excel Worksheet Functions 1 November 8th 04 10:35 PM


All times are GMT +1. The time now is 11:55 AM.

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"