Hi, I found a post which said:
- Using Goto doesn't clear the Err object (so Err.Clear is necessary if you use Goto) and it leaves your error handler disabled. If an error occurs after the Cleanup label, it won't be handled at ErrorHandler.
- Using Resume clears the Err object and it switches your error handler back on (it is disabled while it is handling errors). If an error occurs after the Cleanup lable, it will be handled at ErroHandler
The link to this one is below:
I am new to VBA and still learning. Are the above statements correct?
Following that principle, the Err.Clear statement in the code block is not needed because the Resume statement automatically clears it. Is this right?
Bookmarks