Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default GetOpenFilename Folder specfication

How do you specify the initial folder for
Application.GetOpenFilename()?

I've tried numerous Application.* attributes, haven't
been able to find the right one. I also tried specifying
the folder spec in the GetOpenFilename() argument,
doesn't work.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default GetOpenFilename Folder specfication

Try this example sub
I will save your default folder first to set it back at the end

Sub test()
Dim SaveDriveDir As String
Dim TheFileName As Variant
SaveDriveDir = CurDir
ChDrive "C"
ChDir "C:\Data"
TheFileName = Application.GetOpenFilename(filefilter:="Excel Files (*.xls), *.xls")

MsgBox "your code"

ChDrive SaveDriveDir
ChDir SaveDriveDir
End Sub



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Alan" wrote in message ...
How do you specify the initial folder for
Application.GetOpenFilename()?

I've tried numerous Application.* attributes, haven't
been able to find the right one. I also tried specifying
the folder spec in the GetOpenFilename() argument,
doesn't work.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default GetOpenFilename Folder specfication


thanks!

-----Original Message-----
Try this example sub
I will save your default folder first to set it back at

the end

Sub test()
Dim SaveDriveDir As String
Dim TheFileName As Variant
SaveDriveDir = CurDir
ChDrive "C"
ChDir "C:\Data"
TheFileName = Application.GetOpenFilename

(filefilter:="Excel Files (*.xls), *.xls")

MsgBox "your code"

ChDrive SaveDriveDir
ChDir SaveDriveDir
End Sub



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Alan" wrote in

message ...
How do you specify the initial folder for
Application.GetOpenFilename()?

I've tried numerous Application.* attributes, haven't
been able to find the right one. I also tried

specifying
the folder spec in the GetOpenFilename() argument,
doesn't work.




.

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
GetOpenFilename Hasan Cansü Excel Programming 0 September 24th 03 01:32 PM
GetOpenFilename - Default Folder Andy Excel Programming 3 September 19th 03 04:20 PM
specifing default folder with GetOpenFilename Brian Excel Programming 3 September 8th 03 01:55 PM
Using GetOpenFilename Robin Seaby Excel Programming 2 August 6th 03 04:50 PM
GetOpenFilename Daniel[_4_] Excel Programming 3 July 27th 03 11:00 AM


All times are GMT +1. The time now is 05:28 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"