View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chris Ferguson Chris Ferguson is offline
external usenet poster
 
Posts: 26
Default Stop running a macro in the middle of a macro

How about dim public StopFlag

set the stopflag in your second macro and test for it on return to your
first macro

Chris

"gmunro" wrote in message
oups.com...
Hi,

I have a macro that runs another macro in it, something like this

Sub mymacro ()
code

Myothermacro

code

End sub
Sub Myothermacro()

Msgbox
If no then
Exit Sub
End if
End Sub


When I run the macro, if the answer is NO, it ends Myothermacro but
then resumes mymacro.

How can I have a messagebox in Myothermacro have a DEAD STOP and return
to sheet?

Any help is appreciated