View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
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