|
-
Aug 26th, 2007, 11:40 PM
#1
Thread Starter
New Member
Error 91: object variable or with block varaible not set
"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
-
Aug 27th, 2007, 12:06 AM
#2
Re: Error 91: object variable or with block varaible not set
ListPersons.SelectedItem.index will give you that error if there is no item selected or listview does not have any item.
ListPersons.ListItems(row) will return a listitem, that cannot be assigned to a number.
-
Aug 27th, 2007, 12:34 AM
#3
Thread Starter
New Member
Re: Error 91: object variable or with block varaible not set
the listview is not empty and i have selected an item too
i dont think tht's the problem
thank u
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|