Solved

File --> ListBox (multiselect)

Posted on 1997-06-16
2
288 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

746 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

7 Experts available now in Live!

Get 1:1 Help Now