ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dynamic ComboBox Reference (https://www.excelbanter.com/excel-programming/391999-dynamic-combobox-reference.html)

Kigol

Dynamic ComboBox Reference
 
Hello,

Is there any way to dynamically refer to an object on a Form such as
the two methods listed below for 18 different ComboBoxes? Neither
work. I know there must be a way. Thanks.

Call Get_Headings(columnarray())

For i = 1 To 18
Me.Controls("ComboBox" & i).List
'ComboBoxi.List = columnarray
Next i


Kigol

Dynamic ComboBox Reference
 
On Jun 25, 12:19 pm, Kigol wrote:
Hello,

Is there any way to dynamically refer to an object on a Form such as
the two methods listed below for 18 different ComboBoxes? Neither
work. I know there must be a way. Thanks.

Call Get_Headings(columnarray())

For i = 1 To 18
Me.Controls("ComboBox" & i).List
'ComboBoxi.List = columnarray
Next i


Haha I forgot to set the list equal to something. How embarrasing.
Please delete.



All times are GMT +1. The time now is 08:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com