Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Array question
In VB, when you copy a control or give two controls the
same name, VB asks if you want to create an array, and creates the name with a subscript, such as Textbox(1), Textbox(2), etc. It appears that VBA does not do this. I'm not sure how to declare an array here. I have five dropdown combo boxes that I want to each fill with the same five values, and it seemed most efficient to do this with an array. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Array question
VBA doesn't support control arrays.
for i = 1 to 5 userform1.Controls("Combobox" & i).List = Array(1,2,3,4,5) Next -- Regards, Tom Ogilvy "Lee" wrote in message ... In VB, when you copy a control or give two controls the same name, VB asks if you want to create an array, and creates the name with a subscript, such as Textbox(1), Textbox(2), etc. It appears that VBA does not do this. I'm not sure how to declare an array here. I have five dropdown combo boxes that I want to each fill with the same five values, and it seemed most efficient to do this with an array. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
array question | Excel Discussion (Misc queries) | |||
another array question | Excel Worksheet Functions | |||
Array Question | Excel Discussion (Misc queries) | |||
Array Question | Excel Worksheet Functions | |||
vba array question | Excel Programming |