Hi, I have 120 buttons on a form named commandbutton1 - commandbutton120
I have an Excel 97 sheet which will contain the texts I would like displayed on these buttons.
On opening I would like these values to be pasted into the buttons.
I can do this fine by writing 120 lines of code but was hoping there would be a way to do it in a for loop.
something like this (Note the code is wrong, i'm just trying to explain my aim.)
I have several attributes I wish to assign for each button, so would have to edit a lot of lines if this is not possible.
I have an Excel 97 sheet which will contain the texts I would like displayed on these buttons.
On opening I would like these values to be pasted into the buttons.
I can do this fine by writing 120 lines of code but was hoping there would be a way to do it in a for loop.
something like this (Note the code is wrong, i'm just trying to explain my aim.)
Code:
for i=1 to 120
commandbutton & i . value = activecell.value
range("activecell.offset(0,1)").select
next
I have several attributes I wish to assign for each button, so would have to edit a lot of lines if this is not possible.