Morning all,
Below is a piece of code to deal with a deliberate error.
Can someboby explain why, in run mode, 'errhandler'
is not reached, but the error is caught by the standard error
handler, whereas in the compiled EXE, it runs as expected?
This makes writing error handling routines difficult, since
I have to compile the app to find out if the errhandler works OK!
TIA
Geoff Turner
....code follows...
Private Sub cmdTest_Click()
On Error GoTo errhandler
Print 2 / 0
Exit Sub
errhandler:
MsgBox "Oh dear, ERROR"
Exit Sub
End Sub
Below is a piece of code to deal with a deliberate error.
Can someboby explain why, in run mode, 'errhandler'
is not reached, but the error is caught by the standard error
handler, whereas in the compiled EXE, it runs as expected?
This makes writing error handling routines difficult, since
I have to compile the app to find out if the errhandler works OK!
TIA
Geoff Turner
....code follows...
Private Sub cmdTest_Click()
On Error GoTo errhandler
Print 2 / 0
Exit Sub
errhandler:
MsgBox "Oh dear, ERROR"
Exit Sub
End Sub
Comment