Solved

File --> ListBox (multiselect)

Posted on 1997-06-16
2
298 Views
Last Modified: 2012-06-27
How can I multiselet files in  a FileListBox and have them added to a ListBox? Also, how can I write the ListBox to a file (all contents of). Any help would be highly credited. Thank you. --Mike
0
Comment
Question by:powermike
2 Comments
 
LVL 1

Accepted Solution

by:
mirkus earned 100 total points
ID: 1427368
For resolve your first problem follow this step:

1) Set Multiselct proprety in Filelist Control
2) You must chocie an event or an procedure that you'll use to catch files from FileListBox to ListBox (For example GotFocus on List Focus)

Private Sub FileList  GotFocus()
Dim i, Contatore As Integer
Dim File_selez() As String    'Matrix variable

Contatore = -1
List1.Clear

    For i = 0 To File.ListCount - 1
        If File.Selected(i) Then
            Contatore = Contatore + 1
            ReDim Preserve File_selez(Contatore)
            File_selez(Contatore) = File.List(i)
    End If

Next i
   
For i = 0 To UBound(File_selez)
        List1.AddItem File_selez(i)
Next i


Note: "File" is the Name of FileListBox Control
          "List1" is the Name of List Box Control

For your second problem I don't understand

                                             Mirkus.....
0
 

Author Comment

by:powermike
ID: 1427369
I meant, how do you save all entries in the ListBox, using the commondialog commands? --Mike
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now