Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exit Routine from Sub Routine 1

Status
Not open for further replies.

TimTDP

Technical User
Feb 15, 2004
373
ZA
I have a Routine that calls a sub routine.
Can I cancel the main routine from the sub routine?

I have an instance where a condition in the sub routine is met I want all code to stop.
 
The approach that I would use is something like:

Main Routine
Dim blnDone as Boolean

Call SubRoutine(blnDone)

If blnDone then

Exit

Else

Do Something

End if

Exit here

This should acheive what you are looking for.

HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top