View Single Post
 
Old 05-30-2018, 04:38 AM
slaycock slaycock is offline Windows 7 64bit Office 2016
Expert
 
Join Date: Sep 2013
Posts: 256
slaycock is on a distinguished road
Default

Quote:
Ok, but can I ask why?
I suspect its the simple fact that in VBA handling errors is messy and not immune to user error.

I am embarrased to say I have wasted hours on a number of occasions trying to figure out why code was stopping and highlighting an error when using an on error statement.

In each case it was because I'd been debugging something else previously and had left the IDE error trapping option set to 'Break on all errors' .

Your point about the length of time the loop could take is quite valid and if this was a problem then I'd probably resort to investigating an alternative method such as the one you suggest.

PS I read up on the tag property for forms. Its interesting the neither of the two books I have on VBA programming mention this at all. I can see its value but my preference is to use a specific and well named property. In this case, on reflection, I would probably change the result property name to ValidatedOK, but that a personal preference.
Reply With Quote