Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have a form which contains 10 labels, named Lb1 to Lb10. The form has a combobox and a command button. What I would like to is each time the command button is clicked the text in combobox is added to the labels. I've tried the following but it doesnt work. sub commandbutton_click() dim count as integer dim lablename as string count = 1 lablename = CStr(count) ' I thought I would need to cast the variable Lb & lablename.caption = cblist.text count = count + 1 ' I will need to create a loop so that the count stops at 10. end sub Also I'm sure there's a much better way to do this. Could you create an array of label names then loop through them using count? Any help as always greatly appreciated. David |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Userform Label | Excel Discussion (Misc queries) | |||
Userform blinking label | Excel Programming | |||
UserForm label doesn't load? | Excel Programming | |||
UserForm Label & Format Problems | Excel Programming | |||
Making a TextBox look and feel like a Label in a userform | Excel Programming |