LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default exit sub

how do i get out of all subs upon a certain event?

sub1()
call sub2
'more code here--i do not want sub1 to get this far unless sub2 runs all the
way through
end sub

sub2()
if 1=1 then
exit sub 'i want this to quit sub1 as well as sub2
end if
end sub

there may be more embedded subs, so i don't think i can specify which sub to
exit (if that is even possible).
thanks, mike allen


 
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
Exit Sub Jeff Excel Discussion (Misc queries) 2 March 1st 08 06:21 PM
Run when exit PH NEWS Excel Worksheet Functions 1 July 18th 06 03:53 PM
Exit via macro only? Brisbane Rob Excel Discussion (Misc queries) 1 October 13th 05 01:16 PM
If a called sub exit, how to the caller exit right away? luvgreen[_4_] Excel Programming 4 February 24th 04 05:06 PM
Exit Sub? Eva Shanley[_2_] Excel Programming 3 December 24th 03 02:15 PM


All times are GMT +1. The time now is 09:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"