Selecting multiple long-filenames (1 Viewer)

Access9001

Registered User.
Local time
Yesterday, 17:45
Joined
Feb 18, 2010
Messages
268
I want to be able to open up a file selection browser, highlight a bunch of items, and return a string of those selected items with their full paths.

e.g. "C:\whatever.doc; C:\path\whatever.xls; C:\lol\omg.txt"
 

KeithG

AWF VIP
Local time
Yesterday, 17:45
Joined
Mar 23, 2006
Messages
2,592
I don't see what your question is?
 

Access9001

Registered User.
Local time
Yesterday, 17:45
Joined
Feb 18, 2010
Messages
268
That is my question -- how would I do this?

I've tried messing around with various things like the common dialog etc but I just can't get it to do what I want it to. I just want code that will prompt the user to select files, to which I return a string containing all the chosen files.
 

KeithG

AWF VIP
Local time
Yesterday, 17:45
Joined
Mar 23, 2006
Messages
2,592
You will need to build a custom form with a listbox in which the user can select the files.
 

KeithG

AWF VIP
Local time
Yesterday, 17:45
Joined
Mar 23, 2006
Messages
2,592
Also you can use the FileSystemObject to retrieve all files in a folder.
 

Access9001

Registered User.
Local time
Yesterday, 17:45
Joined
Feb 18, 2010
Messages
268
How would I do that, if that's indeed what it does?

Oh so you're saying not a file dialog box but just something that lists files in a given directory and allows for multiple selection? How would file dir traversal work?
 

Access9001

Registered User.
Local time
Yesterday, 17:45
Joined
Feb 18, 2010
Messages
268
It doesn't even let me dim it.

Dim fso As New FileSystemObject fails by itself

NVM I worked around it with:

Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Dim drv As Object
 

KeithG

AWF VIP
Local time
Yesterday, 17:45
Joined
Mar 23, 2006
Messages
2,592
You need to set a reference to the Microsoft Scripting Runtime
 

Access9001

Registered User.
Local time
Yesterday, 17:45
Joined
Feb 18, 2010
Messages
268
Cool, I'll play around with this a bit. Thanks for the help.
 

Access9001

Registered User.
Local time
Yesterday, 17:45
Joined
Feb 18, 2010
Messages
268
How do I allow for multiple selections on a listbox? NVM found it.
 

Users who are viewing this thread

Top Bottom