How do you write the SelectedIndexChanged code to give the index of the item selected?
Printable View
How do you write the SelectedIndexChanged code to give the index of the item selected?
Private Sub ComboBox1_SelectedIndexCahnged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim i as integer
i=ComboBox1.SelectedIndex
MsgBox(i & " is the selected index")
End Sub
I guess what I really need is a doubleclick event for my listview...
something to show the index of the item that is double clicked.
BTW, thanks for the reply hole-in-one.
This will work:
Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.DoubleClick
Dim i As Integer
i = ListView1.SelectedIndices.Item(0)
MsgBox(i & " is the selected index")
End Sub
Thanks again:wave: