Dim i As Integer = ListBox1.FindString(TextBox1.Text) ListBox1.SelectedIndex = i If TextBox1.Text = "" Then ListBox1.SelectedIndex = -1 End If