dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Multi Selection in Listbox

  1. #1
    Join Date
    Jan 2002
    Location
    Sinapore
    Posts
    77

    Multi Selection in Listbox

    Hi all gurus,

    I have activate the multi selection property in a listbox.

    My concern is how am i going to detect the item number for those items i select?

    Thanks in advance

  2. #2
    Join Date
    Apr 2002
    Location
    Los Angeles, Ca
    Posts
    238
    Take a look at this code..
    Code:
    Private Sub Command1_Click()
    Dim i As Integer
         For i = 0 To List1.ListCount - 1
              If List1.Selected(i) Then
                   Debug.Print "You chose " & List1.List(i)
                   Debug.Print "at position " & i
              End If
         Next i
              
    End Sub

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)