Results 1 to 2 of 2

Thread: search a listview and return

  1. #1

    Thread Starter
    Lively Member Scorpionz's Avatar
    Join Date
    Feb 1999
    Location
    lafayette/kaplan, louisiana, usa
    Posts
    72

    Exclamation

    how would i be able to search a listviews items and return the subitem of the item found?

  2. #2
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    617
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width