Two Listboxes problem??
Posted on 2006-11-05
I have two ListBoxes in which I move items from Listbox1 to ListBox2 using DoubleClick on the item. I need to be able to check if the item is in Listbox2 then issue an error. But, my "If" statement below isn't working....
How would the "If" statement be coded???
Private Sub List1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles List1.DoubleClick
If List1.SelectedIndex = List2.SelectedIndexCollection Then
MsgBox("Server already exists")