1st set
Do Until cboCar.Text = cboCar.List(cboCar.ListIndex) If cboCar.Text <> cboCar.List(cboCar.ListIndex) Then cboCar.AddItem cboCar.Text Else MsgBox "Already There" End If Loop
2nd set
' If cboCar.Text <> cboCar.List(cboCar.ListIndex) Then ' Do ' cboCar.AddItem cboCar.Text ' ''Add to combo box ' Loop Until cboCar.Text <> cboCar.List(cboCar.ListIndex) ' ' Else ' ' MsgBox "Already There" ' ''Display Textbox if it's in the combo box already ' End If
Basically, i want the program to give a pop up if the data is in the combobox already. if it's not enter, then i want to add it into the combobox. Tell me what i am doing wrong.