Results 1 to 3 of 3

Thread: multiselect-able listboxes

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2001
    Location
    Linkoping, Sweden
    Posts
    50

    multiselect-able listboxes

    How do I find all selected items in a multiselect-listbox?

  2. #2
    Fanatic Member Bonker Gudd's Avatar
    Join Date
    Mar 2000
    Location
    Saturn
    Posts
    748
    VB Code:
    1. For intCount = 1 To ListBox.ListCount - 1
    2.         If ListBox.Selected(intCount) = True Then
    3.             'Do stuff here
    4.         End If
    5.     Next

  3. #3
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Loop through the list and check the Selected property
    VB Code:
    1. Dim i As Integer
    2. For i = 0 To List1.ListCount - 1
    3.     If List1.Selected(i) Then
    4.         Debug.Print "Item number " & i & " is selected"
    5.     End If
    6. Next
    Best regards

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