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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script EXIT 1

Status
Not open for further replies.

ErroR

Technical User
Apr 9, 2001
79
US
I'm sure this has been asked before..

How do I get my script to exit after an error? For instance:

If Err <> 0 Then MsgBox &quot;Error!&quot; & &quot; &quot; & Err


I want the script to exit immediately after displaying the MsgBox. I don't want it to carry on through the rest of the script.. is there an Exit command kinda like Exit Function or Exit Sub???
 
Wscript.Quit or Response.End for VBS/ASP respectively. If my post was helpful, please Mark it below. Thanks! - Al
 
I knew something simple had to exist..

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top