?
Solved

File --> ListBox (multiselect)

Posted on 1997-06-16
2
Medium Priority
?
354 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

764 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