Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populating ComboBoxes
I'm trying to populate a combobox control with items from a Range on a
worksheet. I have code that returns a Variant assigned to a Range of cells in a WorkSheet. Is there an easy way to assign these values to the ComboBox, or must I loop through the Variant array? I tried assigning the ComboBox RowSource Property to the Variant but got an error. My code looks something like this: Public Function GetData() as Variant Dim rng as Range Set rng = MyWorkSheet.Range("$A$1:$E$1") GetData = rng End Function Private Sub MyForm_Initialize() ComboBox1.RowSource = GetData End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
comboboxes | Excel Discussion (Misc queries) | |||
Comboboxes | New Users to Excel | |||
Urgent Help, Comboboxes and IF. | Excel Discussion (Misc queries) | |||
Need help with ComboBoxes. | New Users to Excel | |||
Comboboxes | Excel Programming |