Results 1 to 4 of 4

Error handling: "Resume without Error"

Threaded View

  1. #1
    Forum Contributor
    Join Date
    09-23-2008
    Location
    UK
    Posts
    137

    Error handling: "Resume without Error"

    my code has the following structure:

    Dim ErrHandler, stepline As Label
    
    'Error handling
    ErrHandler:
    MsgBox "TS not available"
    Resume stepline:
    
    Do while count<limit
    
    'code 1...
    
    On error Goto ErrHandler:
    n=1/x
    
    'code 2...
    
    stepline:count=count+1
    Loop
    When there is an error (eg if x=0) I get the message "Run time error 20, resume without error" and the resume line is highlighted yellow.

    basic objective is to skip over second piece of code within the loop and increase count before continuing if there is an error.

    Thanks
    Last edited by firefly2k8; 09-08-2010 at 07:48 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1