Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filling Combo Box in Excel

Status
Not open for further replies.

davetek

Programmer
Oct 30, 2002
42
IE
hey,

is it possible to manually fill a combo box with values in excel (i.e. through properties)...the only way i can see is to use a range which i'd rather not use...

cheers
 
Where is the combo box? On Userform, object from Controls Toolbox, object from Forms toolbar?


Rob
[flowerface]
 
Hi Dave,

I don't know a way of doing it manually but you could populate the items when the workbook was opened.....

Private Sub Workbook_Open()
' Populate drop-down list with Fruit Items

ComboBox1.FontSize = 9
ComboBox1.AddItem "Melons"
ComboBox1.AddItem "Apples"
ComboBox1.AddItem "Oranges"
End Sub

Regards

John
 
combobox1.clear
For i = 1 to 50
combobox1.additem(i)
next i

will put the numbers 1 thru 50 into the combobox1 list

Rgds, Geoff
Quantum materiae materietur marmota monax si marmota monax materiam possit materiari?
Want the best answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top