Thread: Kill Macro
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Otto Moehrbach Otto Moehrbach is offline
external usenet poster
 
Posts: 1,090
Default Kill Macro

You do this with the statement End. That's it. It is highly recommended,
though, that you not ever use the End statement. You will be taking a
chance of leaving a lot of loose ends. Don't do it!!!!

You can back out of all the code in an orderly fashion. I do it all the
time. Post back and provide more detail about what you have. For instance,
what is the condition that will provoke you to end all code running? HTH
Otto

"Jeff" wrote in message
...
Hi,

I am running a macro and want to put in an option where the program stops
under certain conditions

IF (statement=true) then stop the macro

I was using "Exit Sub" but this just kicks it out of the sub(), not the
entire macro. Is there a way to end the entire macro?

Thanks for your help!