bodhi
12-14-2005, 07:22 PM
Hi everyone,
I do not know if what i am trying to do is possible but if it is, i am sure there is a very simple answer out there. Here's what i want to do:
I have created a user form and added several command buttons to it at design time. Let's say their names are cmdBtn1, cmdBtn2, ... , cmdBtn9.
I want to be able to use the names in a loop to assign a caption to the relative command button.
eg. cmdBtn(count).caption = range("A" & count).value
is there any way to concatenate the first part of the name "cmdBtn" with a variable integer "count" and use it in the form above? http://vbaexpress.com/forum/images/smilies/102.gif
maybe there is a simpler way around this...????
http://vbaexpress.com/forum/images/smilies/think.gif
I do not know if what i am trying to do is possible but if it is, i am sure there is a very simple answer out there. Here's what i want to do:
I have created a user form and added several command buttons to it at design time. Let's say their names are cmdBtn1, cmdBtn2, ... , cmdBtn9.
I want to be able to use the names in a loop to assign a caption to the relative command button.
eg. cmdBtn(count).caption = range("A" & count).value
is there any way to concatenate the first part of the name "cmdBtn" with a variable integer "count" and use it in the form above? http://vbaexpress.com/forum/images/smilies/102.gif
maybe there is a simpler way around this...????
http://vbaexpress.com/forum/images/smilies/think.gif