Results 1 to 3 of 3

Thread: FileListBox MultiSelect [RESOLVED]

  1. #1

    Thread Starter
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    FileListBox MultiSelect [RESOLVED]

    I'm having a problem with the FileListBox.Selected property. I have searched on here but nothing comes to light.

    Set File1.MultiSelect = 2 (extended). But how can I obtain each file name that I choose (multi select)? Let say I choose/highlighted 3 files from the file list box. I want them to be display on msgbox, but how??

    It only displays the last file selected in the msgbox. What am I missing.

    VB Code:
    1. Private Sub cmdDisplay_Click()
    2.  
    3. Dim count As Integer
    4. Dim N As Integer
    5.  
    6. count = File1.ListCount
    7.  
    8. For N = 0 To count - 1
    9. If File1.Selected(N) = True Then
    10. MsgBox File1.FileName
    11. End If
    12. Next
    13.  
    14. End Sub

    Thanks.
    Last edited by Keithuk; Jun 12th, 2004 at 02:01 PM.

  2. #2
    Private Sub cmdDisplay_Click()

    Dim count As Integer
    Dim N As Integer

    count = File1.ListCount

    For N = 0 To count - 1
    If File1.Selected(N) = True Then
    MsgBox File1.List(N)
    End If
    Next

    End Sub

  3. #3

    Thread Starter
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236
    Thanks nareth. I thought I was missing something.

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