Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Excel 97.
As fas as I understand VB in Excel does not have control arrays, no controls have an index property. On a form I have seven labels called lbl1 to lbl7. I would like to set their captions to a(i) where a is an array and i runs from 1 to 7. The code below does not work: for i = 1 to 7 labelname = "lbl" & format(i) &labelname.caption = a(i) next but is there a way to construct the name of the control as a string, and then use it? I would hate to have to say: lbl1.caption = a(1) lbl2.caption = a(2) etc Any help is greatly appreciated. Sincerely, Jan Nordgreen |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Counting the lack of a union of two lists | Excel Worksheet Functions | |||
Excel lack of compatibility | Excel Discussion (Misc queries) | |||
Control arrays on Excel 2007 userforms | Excel Discussion (Misc queries) | |||
Help with GUI (for lack of a better term) | Excel Discussion (Misc queries) | |||
Nice idea lack of knowledge! | Excel Discussion (Misc queries) |