Adding items to a ComboBox in Excel VBA

G

Glenn Speed

I would like to be able to dynamically add new items to a combobox
using the contents of cells in the spreadsheet. for example, C3..C6
contain the info to be added to the combobox. Can someone tell me the
code to accoplish this. I am familiar with the ComboBox.AddItem
property, but I would like to populate the combobox directly from the
spreadsheet.

Thanks in advance to anyone.
 
P

papou

Hello Glenn
For i = 1 to 6
Combobox1.additem(worksheets("Sheet1").cells(i,3).Value
Next i

HTH
Cordially
Pascal
 

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

Top