954,541 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how add items in combo box but without repetition

guys help me with the code for adding items in the combo box but without duplicates. i have an assignment which is a simple web browser. the combo box will be the address bar. and everytime i input an address, it will be added in combo box and should not repeat just like in the browsers. i hope you could help me. thanks

angel392004
Newbie Poster
13 posts since Aug 2010
Reputation Points: 10
Solved Threads: 0
 


ComboBox.FindString will return the index of an item that matches.

See if this helps.

If combox1.FindString("The String To Search") < 0 Then
            combox1.Items.Add("The String To Search")
        End If
Unhnd_Exception
Posting Pro
570 posts since Nov 2010
Reputation Points: 249
Solved Threads: 201
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: