Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts

    on error goto sub

    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

  • #2
    Regular Coder
    Join Date
    Oct 2004
    Location
    In front of this computer. (Where else?)
    Posts
    442
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Check this link. I think it works with vbscript.

    http://www.devguru.com/Technologies/...f/onerror.html
    Tomorrow is the first day of the rest of your life... What have you done today?
    Tutorials
    Web: w3schools, htmldog General tips: Hardware, Networking

  • #3
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    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

  • #4
    Regular Coder
    Join Date
    Jul 2004
    Location
    France
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    On Error Resume next
    run your code here

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

  • #5
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •