Search and select listbox

aymanm

New member
Joined
Jul 17, 2007
Messages
2
Programming Experience
1-3
Hello-
I need vb .net code so that if I click item in form1.listbox1 it selects same item in form2.listbox1 and if not found try form2.listbox2, etc. This is the closest I could get. :rolleyes: Thanks!
Public Class Form1
Private Sub ListBox1_DoubleClick(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles ListBox1.DoubleClick
Dim x As String
x = CStr(ListBox1.SelectedItem)
Form2.ListBox1.SelectedItem = x
Form2.ListBox2.SelectedItem = x
End Sub
End Class
 
Hello-
I need vb .net code so that if I click item in form1.listbox1 it selects same item in form2.listbox1 and if not found try form2.listbox2, etc. This is the closest I could get. :rolleyes: Thanks!
Public Class Form1
Private Sub ListBox1_DoubleClick(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles ListBox1.DoubleClick
Dim x As String
x = CStr(ListBox1.SelectedItem)
Form2.ListBox1.SelectedItem = x
Form2.ListBox2.SelectedItem = x
End Sub
End Class
 
Back
Top