Hi, I tried to nest error handler within an error handler, which as I found out is not really possible.
However I did manage to find solution, which made it work, but without explanation how and why. I don't want to blindly use codes, even though they do work for me.
Can someone please explain to me, why this workaround works?
The key lines are the red ones. Without them it would be just nesting error handler into error handler, which doesn't work and you get the usual VBA error message instead of progressing to second error handler.
However I did manage to find solution, which made it work, but without explanation how and why. I don't want to blindly use codes, even though they do work for me.
Can someone please explain to me, why this workaround works?
Code:
On Error GoTo Errorhandler
*code
Errorhandler:
*code
[COLOR=#ff0000]Resume Error
Error:[/COLOR]
On Error GoTo Errorhandler2
The key lines are the red ones. Without them it would be just nesting error handler into error handler, which doesn't work and you get the usual VBA error message instead of progressing to second error handler.