Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

File --> ListBox (multiselect)

Posted on 1997-06-16
2
Medium Priority
?
363 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
mirkus earned 300 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
Suggested Courses

610 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