View Full Version : on error goto sub

02-03-2005, 11:08 AM
i have seen
on error goto 0 (stop execution)
on error resume next (dont run erroneous line)

and in a vba module i saw a on error goto SomeSub (where SomeSub was a sub).. is this at all possible in vbscript asp? i have a feeling it isnt but its worth asking i spose :rolleyes:

02-03-2005, 01:39 PM
Check this link. I think it works with vbscript.


02-03-2005, 02:16 PM
well yea i knew those 2, i just said them, i was just wondering if there was a way to go to a subroutine on an error

02-03-2005, 02:43 PM
On Error Resume next
run your code here

If Err.Number <> 0 then
CALL yourSub
End If

02-03-2005, 04:23 PM
yea but i mean for that to happen when an error happened you would have to have

If Err.Number <> 0 Then Call yourSub

on every other line :(