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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top