Thread: Ending Sub
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Paul Paul is offline
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