...

View Full Version : on error goto sub



ghell
02-03-2005, 11:08 AM
i have seen
on error goto 0 (stop execution)
and
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:

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

http://www.devguru.com/Technologies/vbscript/quickref/onerror.html

ghell
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

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

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

ghell
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 :(



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum