ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open File (https://www.excelbanter.com/excel-programming/309484-open-file.html)

Kevin

Open File
 
When using the GetOpenFileName method, is there a way to
set the directory the Open dialog box will start in? I
will have a default path for all files the user will need
to open.

Thanks!

Kevin

Kevin

Open File
 
I found it:

Application.DefaultFilePath = "c:\mypath"


-----Original Message-----
When using the GetOpenFileName method, is there a way to
set the directory the Open dialog box will start in? I
will have a default path for all files the user will need
to open.

Thanks!

Kevin
.


Jim Rech

Open File
 
GetOpenFilename opens to whatever the current path is on the current drive.
So you could use ChDrive and ChDir to set these.

--
Jim Rech
Excel MVP
"Kevin" wrote in message
...
| When using the GetOpenFileName method, is there a way to
| set the directory the Open dialog box will start in? I
| will have a default path for all files the user will need
| to open.
|
| Thanks!
|
| Kevin



Tom Ogilvy

Open File
 
Nope, you missed it. This only sets where excel looks when you start it.
See Jim Rech's post.

--
Regards,
Tom Ogilvy

"Kevin" wrote in message
...
I found it:

Application.DefaultFilePath = "c:\mypath"


-----Original Message-----
When using the GetOpenFileName method, is there a way to
set the directory the Open dialog box will start in? I
will have a default path for all files the user will need
to open.

Thanks!

Kevin
.





All times are GMT +1. The time now is 12:08 AM.

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