Combobox list items
Joe, try either looping through your range and using the .AddItem method or
set the .RowSource of the combobox to your range. For example:
Dim rCell as Range
Dim r as Range
Set r = Range("A1:A10")
For Each r in rCell.Cells
ComboBox1.AddItem r
Next
or more simply:
Dim r as Range
Set r = Range("A1:A10")
ComboBox1.RowSource = r.Address
--
Charles Chickering
"A good example is twice the value of good advice."
"joeeng" wrote:
I actually want the list to have only one item at times and many items at
other times.
"Bob Phillips" wrote:
Combobox1.Value = "List Item 1"
--
HTH
Bob Phillips
(replace xxxx in the email address with gmail if mailing direct)
"joeeng" wrote in message
...
Can a Combobox list contain only one item? For instance,
Combobox.List = "List Item 1"
or
Combobox.List = Range(Cells(1,1),cells(1+Ivalue,1)).Value
where Ivalue=0 sometimes
I keep getting an error "List property cannot be set"
|