Combobox list items

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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"
 
Combobox1.Value = "List Item 1"

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 
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
 
Back
Top