Error Handling in vbscript - TechRepublic
General discussion
July 23, 2001 at 05:18 AM
vickydicky

Error Handling in vbscript

by vickydicky . Updated 24 years, 10 months ago

Hello friend I am trying to use error handling machanism of vbscript to traps errors.
My code is like this.

sub myProc
On Error Goto MyErrorHandler
code of the procedure
again code of the procedure

exit sub MyErrorHandler:
code to handle error
few more lines to handle code
end sub

My problem is i am getting syntax error on the line where my “On Error Goto MyErrorHandler” statment is present. And on thisline it is pointing at the begining of MyErrorHandler Label.

Please solve my problem

This discussion is locked

All Comments