combo box range

S

stevieh

hi,

what is the code so that my combo box lists data that is not hard code
but taken from a range in the sheet?

currently i have this

Private Sub ComboBox1_Change()
ComboBox1.AddItem "england"

but want it to select it from a range i.e a1 to b
 
B

Bob Phillips

Combobox.ListFillRange = "A1:B2"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
J

jeff

Hi,

You can do this in your sub:

ComboBox1.AddItem Range("A1").Value
ComboBox1.AddItem Range("A2").Value
ComboBox1.AddItem Range("A3").Value

jeff
 

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

Similar Threads


Top