Hi - I have the following VBA and need to add some code at the end of the line to Quit the Macro after “err.Clear” at present it proceeds to the next lines until the end.
Can anyone help?
TaPlease Login or Register to view this content.
Hans
Hi - I have the following VBA and need to add some code at the end of the line to Quit the Macro after “err.Clear” at present it proceeds to the next lines until the end.
Can anyone help?
TaPlease Login or Register to view this content.
Hans
Do you mean like
?Please Login or Register to view this content.
Please Login or Register to view this content.
Click *Add Reputation to thank those who helped you. Ask if anything is not clear
If you want to quit the subroutine after error, write the line like this:
or longer but possibly easier to read:Please Login or Register to view this content.
There's no need of Err.Clear; the Err object is cleared automatically when the subroutine terminates and that's what the 'Exit Sub' command does.Please Login or Register to view this content.
Last edited by JBeaucaire; 03-01-2017 at 05:08 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks