Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default specify an input directory with GetOpenFilename

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default specify an input directory with GetOpenFilename

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default specify an input directory with GetOpenFilename

It works wonderfully!
Thanks a lot!
Valeria

-----Original Message-----
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

.

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
Validation of input against the active directory Sing Chung[_2_] Excel Worksheet Functions 1 July 23rd 09 04:19 PM
GetOpenFilename w/default starting directory [email protected] Excel Programming 1 November 9th 03 04:55 PM
GetOpenFilename Hasan Cansü Excel Programming 0 September 24th 03 01:32 PM
Setting default directory prior to GetOpenFilename David R[_3_] Excel Programming 2 September 2nd 03 12:35 PM
Using GetOpenFilename Robin Seaby Excel Programming 2 August 6th 03 04:50 PM


All times are GMT +1. The time now is 09:47 PM.

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"