Having never used class modules before, I am wondering if i am able to define my own custom object like a command button, that has common methods with each new instance of the same button.
In my current concept, I have a form with about 20 command buttons whose click, gotfocus & etc events are exactly the same except the procedure they call needs to know the name of the button that called it & make mods to that button. This would require the making of 20 buttons on this form, and 3 x 20 (at least) events, and at least 3 procedures.
Would it be easier to make a user defined object in a class module whose methods are those 3+ procedures, and on opening the form, populate the form with several instances of that button? Or could that be done in design view before hand? Or is this just as much work? Or - even not possible?
I hope I am clear, I will look more into the class modules after I get some responses if others think its the way to go.
thanks for your time!
In my current concept, I have a form with about 20 command buttons whose click, gotfocus & etc events are exactly the same except the procedure they call needs to know the name of the button that called it & make mods to that button. This would require the making of 20 buttons on this form, and 3 x 20 (at least) events, and at least 3 procedures.
Would it be easier to make a user defined object in a class module whose methods are those 3+ procedures, and on opening the form, populate the form with several instances of that button? Or could that be done in design view before hand? Or is this just as much work? Or - even not possible?
I hope I am clear, I will look more into the class modules after I get some responses if others think its the way to go.
thanks for your time!
Last edited: