Quote:
>> Just a quick question, what is the VBScript equivalent of VB's 'End'
>> command? My .vbs application has a series of OK/Cancel message box
>> prompts, and I want the code to end execution if the user selects
>> Cancel...
> Hi
> WScript.Quit
And WScript.Quit(integer value) will set the exit code if you want to trap
for that somewhere else.
WScript.Quit(0)
exits with exit code 0
WScript.Quit(3)
exits with exit code 3
WScript.Quit(11)
exits with exit code 11
I call a lot of VBS routines from batch routines so it's important to me
what the status was. I exit with 0 if all went as expected, then use
different exit codes to indicate different things; example: 1 for user
cancelled the script, 2 for a required external file was not found, etc.
etc.