Hi
If you are happy with your solution and think it works consistently for you then that is fine. It is your responsibility so you should decide how to do things. That’s important.
But note:
Using On Error Resume Next , is in all but a few limited cases and for all but short code sections, generally regarded as very, very bad practice.
On Error Resume Next does not stop any errors
On Error Resume Next simply tells VBA to ignore them and keep running at the next line
Moreover, many problems and errors may occur, but On Error Resume Next instructs VBA to keep going, and this could occasionally lead to disastrous results.
Error handling in VBA
Error handling in VBA is one of the most advanced subjects, and is one area that is strangely only understood by just a very few number of people. Many experts and professional programmers do not understand fully how Error handling in VBA works
( I am one of about half a dozen people on this planet that fully understand how error handling in VBA works.
Anyone who understands how error handling in VBA works will only use On Error Resume Next in a very limited number of ways for very short code sections.
I once saw a very bad error in the use of error handling at a very famous Blog site. I tried to explain the problem to this person responsible who was one of the leading VBA experts. After two weeks he could not understand the problem, and , in frustration, reluctantly removed the entire Blog page at his site! )
At some time in the future, something unexpected and bad might occur when your macro is running. It might not be directly related to your coding. In this situation it will be very important for VBA to stop running your code and tell you in an error message what the problem is. Your use of On Error Resume Next will prevent VBA from taking the important error handling action. The code will simply keep going. This may be a very rare occurrence, but the consequences could be very serious.
Using On Error Resume Next is like instructing a car driver to always just keep driving regardless of any problems or accidents and to simply ignore everything and keep driving regardless of all the consequences.
In general, if it is possible, it is much better to prevent an error occurring, than to let it happen and ignore it.
On Error Resume Next tells VBA to ignore all errors anywhere . This is very bad programming practice
Somebody who understands error handling in VBA, will only reluctantly use On Error Resume Next to ignore a single error at a specific place in a coding if
_a) he is 99.999% sure that he understands the error and all the consequences , and
_b) he cannot figure out anyway to prevent that error occasionally occurring
Never the less, the solution for a short coding might mostly work most of the time.
Its your choice.
Alan