specify an input directory with GetOpenFilename

M

Merkling, Steven

Give this a shot

'Load the Input Dir
InputDirectory = "C:\"

'Save the current Dir for later Clean up
CurrentDirectory = CurDir

'Change the Dir to look in
ChDir (InputDirectory)

'Load FileNameToOpen
FileNameToOpen = Application.GetOpenFilename

'Clean up
ChDir (CurrentDirectory)


HTH
-Merk
 
V

Valeria

Dear experts,
I am using in a macro the GetOpenFilename method to open
workbooks on which I am then working.
Is there a way I can specify in which directory I want it
to open (like a sort of "default value" for input boxes)?
Many thanks,
Valeria
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top