h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

Find existing item in ComboBox in Vb.net

Today we will discuss about Find existing item in Combobox in VB.Net

Private Sub ComboBox1_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.Leave
Dim resultIndex As Integer = -1
resultIndex = ComboBox1.FindStringExact(ComboBox1.Text)
If resultIndex > -1 Then
MessageBox.Show("Found It")
Else
MessageBox.Show("Did Not Find It")
End If
End Sub