"Error 91: object variable or with block varaible not set"

i am getting the above error while retrieving the index of selected row in listview

please help me out

Private Sub ListPersons_DblClick()

Dim row As Integer
Dim item As ListItem
Dim personid As Double
Dim bsuccess As Boolean
Dim msName As String


'Listpersons is the name of listview
row = ListPersons.SelectedItem.index
personid = ListPersons.ListItems(row)

End Sub