#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Excel Discussion (Misc queries) 0 April 23rd 09 08:53 PM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Setting up and Configuration of Excel 0 April 23rd 09 08:53 PM
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
file open via IE hyperlink causes already open files to shrink and tile Marc Setting up and Configuration of Excel 0 May 4th 05 08:13 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"