How to I add buttons to an array. I have 42 buttons on a form labeled btn1 through btn42. I want to use a loop to add the buttons to an array. I can add them one at a time
button(0) = me.btn1
button(1) = me.btn2
button(2) = me.btn3 and so on.
I can use a subscript for the button variable in a loop but how do I increment through the btn1 through btn42?
Once I get the buttons in an array, it will be much easier to write code to deal with the button presses. Thank you for any information you can give me.