Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 921
Default Is there a way to disable a macro based on the value of a cell?

Is there a way to disable (or turn off) a particular macro based on the value
of a cell?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Is there a way to disable a macro based on the value of a cell?

Probably not. But you could put a check in the macro to see if it should
continue:

Option Explicit
Sub testme()
dim myValToCheck as variant

myvaltocheck = activesheet.range("a1").value

if ucase(myvaltocheck) = ucase("Stop") then
exit sub
end if

'real code here
End Sub


Jeff wrote:

Is there a way to disable (or turn off) a particular macro based on the value
of a cell?


--

Dave Peterson
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 to go to cell based upon a calculation MARK M Excel Discussion (Misc queries) 7 November 30th 08 01:28 AM
enable/disable button based on cell value Shoney Excel Discussion (Misc queries) 3 January 9th 08 07:34 PM
disable user running macro from Tools Macro Steve Simons Excel Discussion (Misc queries) 4 September 28th 06 06:28 AM
Formula or Macro to hide a row based on a cell value JP Excel Discussion (Misc queries) 0 February 3rd 06 06:10 PM
Conditional formatting based on decision to enable/disable macros? zenahs Excel Discussion (Misc queries) 1 November 15th 05 07:40 PM


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