how would i be able to search a listviews items and return the subitem of the item found?
Printable View
how would i be able to search a listviews items and return the subitem of the item found?
I have used a list view with check boxes...
Here is my function... I trust you can Slightly modify for your case
replace the .checked property
I pass the listview as an argument...
Public Function CheckIfShouldEmailToThisUser(ArgListView As ListView, _
ArgUserName As String) As Integer
'This routine checks whether an item is checked off in a ListView
'and returns the index of the item
Dim newitem As ListItem
Dim itmFound As ListItem
CheckIfShouldEmailToThisUser = -1
Set itmFound = ArgListView. _
FindItem(ArgUserName, lvwText, , lvwPartial)
If itmFound Is Nothing Then
'
Else
'Item is found, but is it checked off?
If ArgListView.ListItems.Item(itmFound.Index).Checked = True Then
CheckIfShouldEmailToThisUser = itmFound.Index
End If
End If
End Function