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: 661
Default Ending Sub

Hi-

I have a sub that calls another sub. If one condition in the second sub is
not met, how can I exit both subs? Using the exit sub command in the second
sub does not prevent the progam from returning to the first sub. Example:

Sub First
'Blabla
Second
'More Code (This is what I don't what executed)
End Sub

Sub Second
If condition= violated then exit sub (but returns to sub first)
End Sub

I just need to know how to write the if statement in Sub Second so if the
condition is true the program exits both subs.
--
Paul
 
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
Filenames ending with :1 and :2 djn Excel Discussion (Misc queries) 7 January 14th 10 04:01 PM
Ending a Sheet nabanco Excel Worksheet Functions 2 June 24th 07 01:23 AM
Week ending [email protected] Excel Worksheet Functions 3 November 1st 05 04:52 PM
Ending zero RAB Excel Discussion (Misc queries) 3 August 25th 05 06:09 PM
Ending a routine art Excel Programming 1 October 27th 03 10:54 AM


All times are GMT +1. The time now is 02:01 AM.

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

About Us

"It's about Microsoft Excel"