What you are looking for is the ListIndex...
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim Ndex As Long
Ndex = ListBox1.ListIndex
MsgBox Ndex
End Sub
Also, don't use index as a variable, Excel already uses it.
'---
Jim Cone
Portland, Oregon USA
http://www.contextures.com/excel-sort-addin.html
(30 different ways to sort in excel)
"mp"
wrote in message
>I want to know which item in a listbox was double clicked on.
> This works but doesn't seem like i should have to do it this way
>
> Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
> Dim index As Integer
>
> With ListBox1
> For index = 0 To .ListCount - 1
> If .Selected(index) Then
> MsgBox index
> End If
> Next
> End With
>
> End Sub
>
> thanks for any tips
> mark