Hi,
I am using loops to add my buttons but I do not know how to link the button to a sub that is already there. I have forgotten to take my code with me so this code might not be right but it is along the right lines.
Code:
For intButton = 2 to intButton = 93
myButton = add.controls(Forms.Button.1, "btnClear" & intButton)
With myButton
.left = 616
.etc
End with
Next intButton
I did find a bit for code selection.onAction or .onClick(assignMacro) but this wouldn't work in the with. There was also another post about classes but I do not know much about them and am not sure if I have time to learn them.
I also tried making subs with each of the names but that did not work.
Could you please help?
Thanks