Try this:
Sub test()
optarray = Split(Range("A1"), ",")
With ActiveSheet.ComboBox1
.Clear
For opt = 0 To UBound(optarray)
.AddItem (optarray(opt))
Next opt
End With
End Sub
Regards,
Stefi
„(E-Mail Removed)” ezt *rta:
> Hey all,
>
> I have a ComboBox on a Userform that I want to populate with a list of
> choices from a single cell. The cell has values like Yes, No, Maybe, I
> Don't Know. They are all separated with a comma. Is there a way to do
> this?
>
> Right now if I do this
>
> With ComboBox1
> .AddItem (The Cell I want)
> End With
>
> The ComboBox gets populated with all the cell contents on a single
> line.
> I would like each string separated by a comma in the cell, to be on a
> separate line in the ComboBox.
>
> Any ideas will be appreciated.
>
> Thanks,
> Kyle
>
|