4.4K Posts

December 17th, 2006 03:00

You can just use End Sub where you want to exit is one way.
 
The other is to use a GOTO statement. 
 
 
Example
 
Sub
 
     Sub
GOTO PROC_END
     end sub
 
 
PROC_END:   'this is where the GOTO statement will take you.  Note, there is a colon after the name.
 
end sub
 
 

Message Edited by Bay Wolf on 12-16-200611:06 PM

Message Edited by Bay Wolf on 12-16-200611:06 PM

4.4K Posts

December 17th, 2006 03:00

:smileymad:
Double post. 
 
  

Message Edited by Bay Wolf on 12-16-200611:04 PM

73 Posts

December 17th, 2006 14:00

Thanks, but this is not what I am looking for. I want to terminate the VBA Excel application (from within a nested subroutine) without having to trace back thru the nested subroutines (back to the origional calling sub).
Crosbylake
No Events found!

Top