Re: Control Array and WithEvents Keyword
To reproduce the problem, open a new project, add a Command Button and a Checkbox. Copy and paste the checkbox and click Yes when it asks if you want to create a control array. Paste all the code in my previous post into the Form's Code Window. Run the Project. It will error at: Set m_chkNewCheckbox1 = ctl.
Now, remove the WithEvents and run it again. It will do what it's supposed to (check the checkbox), but the Click Event will not fire (since WithEvents was removed).
I need to be able to keep the control array and have the Click event fire on the Checkbox variable (m_chkNewCheckbox1), not on the Checkbox itself.
I'd rather be wakeboarding...