Results 1 to 2 of 2

Thread: MultiSelect in listview

  1. #1

    Thread Starter
    Member
    Join Date
    May 1999
    Location
    St. Louis, MO, USA
    Posts
    54

    Post

    I have a listview set up in the report style. I wnat the user to be able to select numerouse lines and then click a button which will modify the lines selected. What I don't understand is how to identify what is selected. If there are more than one item.

    Any help would be appreciated thanks
    Jennifer

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    You need to use the Selected Property to determine which Items are Selected, eg.
    Code:
    Private Sub Command1_Click()
        Dim I As Integer
        With ListView1.ListItems
            For I = 1 To .Count
                If .Item(I).Selected Then
                    'Item is Selected,
                    'Perform Whatever to this Item Here.
                End If
            Next
        End With
    End Sub

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]

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