I have a section of code that evaluates the state of several check boxes. The first group I am calling "Email Controls", the second is "Item Controls". Each check box has its own individual name.
In the first group there will always be at least 5 controls - Email_D through Email_H. There may be additional controls. This code snippet shows one extra called Email_I. The line "On Error GoTo No_More_Email_Controls" works correctly when it hits the non-existent Email_I control.
So far, so good.
The second group will always have Email_6 through Email_10. The code shows two possible extras: Email_11 and Email_12. When the interpreter hits the test line for Email_11 it generates error 438 and pops up a message box - which tells me that the line "On Error GoTo No_More_Item_Controls" either isn't working, or is being ignored. I've tried a dozen different fixes from around the 'net, but it refuses to handle the error.
I have noticed that if I get rid of the first error handler (and the code that would generate it) the second error handler works fine. I tried setting the error handler to "GoTo 0" right before I set the second error handler, but that didn't help. What step am I missing?
----- Code -----
![]()
Please Login or Register to view this content.
Bookmarks