PDA

Click to See Complete Forum and Search --> : On Error ...


SteveS
Dec 9th, 1999, 10:02 AM
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.

c@lle
Dec 9th, 1999, 03:23 PM
Use a function call in your loop:

private function ShiftFilesOK() as boolean
on error goto ErrorHandler
if function succeeds, ShiftFilesOK = true

exit function
ErrorHandler:
ShiftFilesOK = false
end function