Dynamic ComboBox Reference

K

Kigol

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
 
K

Kigol

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top