Private Sub Command1_Click()
MsgBox Combo1.ItemData(Combo1.ListIndex) & " " & Combo1.text
End Sub
Private Sub Form_Load()
CmbAddItem Combo1, "±Ê¼Ç±¾", 1
CmbAddItem Combo1, "̨ʽ»ú", 2
End Sub
Function CmbAddItem(cmb As ComboBox, text As String, data As Long)
cmb.AddItem text
cmb.ItemData(cmb.NewIndex) = data
End Function