Results 1 to 3 of 3

Thread: questionabout FileListBox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    Israel
    Posts
    79

    Question


    i use a file listbox that shows files on my disk.
    i want to select multiple files, and make a list of them in a ListBox.
    i tried some shings, but i only get in the listbox the name of the last file - multiple times.

    what should i do ? , any ideas ?


  2. #2
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    455
    Hello mrz,

    Make a form with a listbox "List1" and a FileListBox "File1".

    Try this code

    Private Sub File1_KeyPress(KeyAscii As Integer)
    Dim n As Integer
    List1.Clear
    If KeyAscii = 13 Then
    For n = 0 To File1.ListCount - 1
    If File1.Selected(n) Then List1.AddItem File1.List(n)
    Next n
    End If
    End Sub

    Good luck,

    Michelle.

    [Edited by michelle on 05-02-2000 at 03:28 AM]

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    Israel
    Posts
    79

    Wink

    thanks,
    I actualy just neded the - File1.List(n)



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