Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If ListView1.SelectedItems.Count = 1 Then '// check if only 1 item is selected.
With ListView1.SelectedItems(0) '// with Selected item.
Form2.TextBox1.Text = .Text '// item text.
Form2.TextBox2.Text = .SubItems(1).Text '// item column 2.Text
Form2.TextBox3.Text = .SubItems(2).Text '// item column 3.Text
Form2.ShowDialog()
End With
ElseIf ListView1.SelectedItems.Count = 0 Then '// if no item selected.
MsgBox("Please select an item to edit.")
ElseIf ListView1.SelectedItems.Count > 1 Then '// for "MultiSelect=True" ListViews.
MsgBox("Please select only one item to edit.")
End If
End Sub
End Class
""sir if i click example 5 items??? because i have many texboxes... look like this..
Item #
textbox1
textbox2
textbox3
textbox4
textbox5
??
thnx :)