Results 1 to 2 of 2

Thread: Searching listview Control

  1. #1

    Thread Starter
    Hyperactive Member gmatteson's Avatar
    Join Date
    Feb 2002
    Location
    Rhode Island, USA
    Posts
    293

    Searching listview Control

    How do I search a listview control for a string such as an email address and return the number of times it is found?
    I can use for x = 0 to ubound(listview.index) because it
    's not an array..... i have two columns

    email address | lastchecked
    [email protected] NA
    [email protected] NA
    [email protected] NA
    [email protected] NA


    Thanks

  2. #2
    Hyperactive Member
    Join Date
    Nov 2002
    Location
    india
    Posts
    418
    hi,

    use this code

    for i=0 to listview.listcount-1
    if listview.list(i).subitems(1)="searchstr" and
    listview.list(i).subitems(2)="searchstr1" then
    ctr=ctr+1
    end if
    next

    msgbox "Total :" & str

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