specify an input directory with GetOpenFilename

  • Thread starter Thread starter Merkling, Steven
  • Start date Start date
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
 
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
 
Back
Top