View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rich J[_2_] Rich J[_2_] is offline
external usenet poster
 
Posts: 38
Default How To Quit Subroutine from a called subroutine

That is actually exactly the command I needed. It is in a Set Up routine and
if certain dates have not been entered, Set Up needs to stop running and a
calendar sheet left open for amending. The macro would keep running and
close the sheet though without the necessary changes. Now, after making the
changes, the user just pushes the Set Up button again and won't have to go to
that part of the program again. It couldn't be a more simple solution.

Thank you once again Tom.


"Tom Ogilvy" wrote:

no good definitive command. You can use END, but it clears all global
variables and does not clean up. Most recommend against using it.

--
Regards,
Tom Ogilvy


"Rich J" wrote in message
...
I have a subroutine that opens a form which calls other routines. Is there
a
simple way to quit all and stop running everything from the called
routine?

When the cursor returns to the calling routine I don't want the rest of
that
code to run in some situations.
I can add a test right after it returns but thought there might be a
definitive command.

Thanks