validating text

campo88

Registered User.
Local time
Today, 23:08
Joined
Nov 20, 2009
Messages
46
In subroutine1, I call on subroutine2.

how can i exit subroutine 1 from a code in subroutine 2?
 
Put a flag in.

In otherwords, in the General Declarations Section of the module that your sub routines are in (assuming they are both in the same module), use:

Private blnExit As Boolean

Then in your subroutine 2, in the exit area of it, put

blnExit = True

and then

in your subroutine1, where you call your subroutine2, just afterwards put

If blnExit Then Exit_Subroutine1

Assuming you have an exit routine named Exit_Subroutine1.
 

Users who are viewing this thread

Back
Top Bottom