Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox
I have create a combbox using toolbarsControl Toolbox. (not used User Form)
I can populate it by altering ListFillRange in properties. What i actually need to do is, using code i want to populate combobox with a range on a second sheet E.G Sheet2 range A1:A10 but ommiting any blank cells in this range. Is this possible? Not used comboboxs before! Please help in newbie talk! Sunil |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox
This macro will do it:
Sub FillCombo() Dim Cel As Range Sheets("Sheet1").ComboBox1.Clear For Each Cel In Sheets("Sheet2").Range("A1:A10") If Cel.Value < "" Then Sheets("Sheet1").ComboBox1.AddItem Cel.Value End If Next End Sub question is When -and Why. You'll have to run this manually as is. HTH. Best wishes Harald "sunilpatel" wrote in message ... I have create a combbox using toolbarsControl Toolbox. (not used User Form) I can populate it by altering ListFillRange in properties. What i actually need to do is, using code i want to populate combobox with a range on a second sheet E.G Sheet2 range A1:A10 but ommiting any blank cells in this range. Is this possible? Not used comboboxs before! Please help in newbie talk! Sunil |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox
Thanks but, i am getting an error message. "Object does'nt support this property or method" Please help "Harald Staff" wrote in message ... This macro will do it: Sub FillCombo() Dim Cel As Range Sheets("Sheet1").ComboBox1.Clear For Each Cel In Sheets("Sheet2").Range("A1:A10") If Cel.Value < "" Then Sheets("Sheet1").ComboBox1.AddItem Cel.Value End If Next End Sub question is When -and Why. You'll have to run this manually as is. HTH. Best wishes Harald "sunilpatel" wrote in message ... I have create a combbox using toolbarsControl Toolbox. (not used User Form) I can populate it by altering ListFillRange in properties. What i actually need to do is, using code i want to populate combobox with a range on a second sheet E.G Sheet2 range A1:A10 but ommiting any blank cells in this range. Is this possible? Not used comboboxs before! Please help in newbie talk! Sunil |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
fill combobox depending on selection from another combobox | Excel Discussion (Misc queries) | |||
Combobox items determined by the selection in another combobox | Excel Programming | |||
Combobox options based on the input of another combobox | Excel Programming | |||
ComboBox list reliant on the entry from a different ComboBox | Excel Programming | |||
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox | Excel Programming |