Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add Values in a comma separated cell to combobox
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add Values in a comma separated cell to combobox
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 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add Values in a comma separated cell to combobox
Thank you Stefi for your reply.
That did excactly what I needed it to. Much Obliged, Kyle |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to I create a comma separated values file | Excel Discussion (Misc queries) | |||
Fixing Comma Separated Values (.csv) | Excel Discussion (Misc queries) | |||
summing comma separated values in a range | Excel Programming | |||
summing comma separated values in a range | Excel Programming | |||
CSV (Comma Separated Values) delimiter ? | Excel Programming |