Click here to Skip to main content
15,943,131 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
How to populate and add items to table using combobox in VB6?
Updated 13-Oct-15 4:11am

1 solution

Please take a look: Visual Basic Combo Box Tutorial (VB6)
Private Sub cmdLoadFoodCombo_Click()

cboFood.AddItem "Orange"
cboFood.ItemData(cboFood.NewIndex) = 60
cboFood.AddItem "Apple"
cboFood.ItemData(cboFood.NewIndex) = 80
cboFood.AddItem "Banana"
cboFood.ItemData(cboFood.NewIndex) = 105

MsgBox "Food combo box has been loaded.", _
vbInformation, _
"Combo Box Demo"

End Sub
Share this answer
Maciej Los 13-Oct-15 10:46am    
Leo Chapiro 13-Oct-15 12:16pm    
Many Thanks, Maciej! :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900