Results 1 to 2 of 2

Thread: On Error ...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Location
    Ireland
    Posts
    96

    Post

    I'm using "On Error" to trap when accessing a file not existing.

    I then jump to a Error Handler, and shift all the files up 1 position, until again I reach the end of the list of files.

    I use "On Error" to exit this loop

    Therefore, my problem is, it is not possible to call an Error handler from within an Error handler, how do I get around this.

    Steve.

  2. #2
    Addicted Member c@lle's Avatar
    Join Date
    Oct 1999
    Location
    Belgium
    Posts
    179

    Post

    Use a function call in your loop:

    Code:
    private function ShiftFilesOK() as boolean
     on error goto ErrorHandler
     if function succeeds, ShiftFilesOK = true
    
     exit function
     ErrorHandler:
     ShiftFilesOK = false
    end function

Posting Permissions

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



Click Here to Expand Forum to Full Width