markkramer
Board Regular
- Joined
- May 8, 2002
- Messages
- 162
Hi.
I'm trying to develop a macro that brings up the File Open dialog box in a specific folder. I found the following code in several places on Mr. Excel but found it still opened up the dialog box in my C:\TEMP folder. Any ideas on how to get it to open in the U:\PAR folder?
Thanks for you help!
Mark
Dim DIRECTORY As String
Dim fileToOpen As Boolean
DIRECTORY = "u:\par\"
ChDir DIRECTORY
fileToOpen = Application.GetOpenFilename("Excel Files (u:\par\*.xls), *.xls")
Workbooks.Open fileToOpen
I'm trying to develop a macro that brings up the File Open dialog box in a specific folder. I found the following code in several places on Mr. Excel but found it still opened up the dialog box in my C:\TEMP folder. Any ideas on how to get it to open in the U:\PAR folder?
Thanks for you help!
Mark
Dim DIRECTORY As String
Dim fileToOpen As Boolean
DIRECTORY = "u:\par\"
ChDir DIRECTORY
fileToOpen = Application.GetOpenFilename("Excel Files (u:\par\*.xls), *.xls")
Workbooks.Open fileToOpen