Quote:
Originally posted by Frans C
Vb doesn't invoke the error handler if it thinks it is handling an error already. So an error inside the error handler will not be handled by this error handler.
This means you need to tell vb that error handling is finished, and you resume with normal code.
You do this with the Resume keyword.
Replace 'GoTo lab1' with 'Resume lab1' and all should work again.
I tend to disagree with the former part of your opinion. I have some code in which I have created the error handler as a DLL. Every time there is an error, from my application I call the error object in my DLL. I had forgotten to create a new instance of this object in the first place. So the first time an error occured in my application, the control went inside the error handler, tried to invoke the error object in my DLL and since it had not been instantiated, fired another error, which was again trapped inside the same error handler.