ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   directory browse... (https://www.excelbanter.com/excel-programming/329115-directory-browse.html)

Mark

directory browse...
 
Hello

Is there a control that I can use in a VBA form to allow the user to browse
the directory structure?

I know about the common dialog control, and assigning initdir and filtering,
etc.

However, there is a place where the user will need to pick two files... it
seems easier to have them pick them both in a form, if possible, than to
sequentially select them on two FileOpen dialog boxes.

Thanks,
Mark

Darrin Henshaw

directory browse...
 
Use GetOpenFileName built-in dialog box, and set the MultiSelect
property to True. That would work if the files are in the same folder.
If they are in separate folders, you might need two dialog boxes.



*** Sent via Developersdex http://www.developersdex.com ***

Alok

directory browse...
 
Mark

There is no intrinsic VBA control available for directory browsing.

Alok

"mark" wrote:

Hello

Is there a control that I can use in a VBA form to allow the user to browse
the directory structure?

I know about the common dialog control, and assigning initdir and filtering,
etc.

However, there is a place where the user will need to pick two files... it
seems easier to have them pick them both in a form, if possible, than to
sequentially select them on two FileOpen dialog boxes.

Thanks,
Mark


Jim Thomlinson[_3_]

directory browse...
 
You want to look up file systems objects in help or on MSDN. You may also
want to take a look at the Microsoft Scripting Runtime reference. This should
head you in the right direction. MSDN can be a bit of a pain but in my
opinion it is a necessary evil so get used to it now and save yourself some
time...

HTH

"mark" wrote:

Hello

Is there a control that I can use in a VBA form to allow the user to browse
the directory structure?

I know about the common dialog control, and assigning initdir and filtering,
etc.

However, there is a place where the user will need to pick two files... it
seems easier to have them pick them both in a form, if possible, than to
sequentially select them on two FileOpen dialog boxes.

Thanks,
Mark


Mark

directory browse...
 
Okay, thanks for the comments, guys.

I'm familiar with most of the suggestions... was just wanting to make sure I
hadn't missed something better.

Mark


All times are GMT +1. The time now is 05:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com