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

I'm working on a macro that uses GetOpenFilename to return
the name of a .dat file that is used to load saved data
into a userform.

Is there a way that I can specify the directory that is
opened in the dialog box? I'm afraid the users will not
know where to look otherwise.

I have been able to specify the directory when using
GetSaveAsFilename to save these same .dat files.

Cheers.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Using GetOpenFilename

Robin

Use ChDir to change the current directory before the GetOpenFilename line.
GetOpenFilename opens to the current directory.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Robin Seaby" wrote in message
...
I'm working on a macro that uses GetOpenFilename to return
the name of a .dat file that is used to load saved data
into a userform.

Is there a way that I can specify the directory that is
opened in the dialog box? I'm afraid the users will not
know where to look otherwise.

I have been able to specify the directory when using
GetSaveAsFilename to save these same .dat files.

Cheers.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Using GetOpenFilename

Chdrive "D"
Chdir "D:\data1\data2\mydata"

' now do getopenfilename

Regards,
Tom Ogilvy


"Robin Seaby" wrote in message
...
I'm working on a macro that uses GetOpenFilename to return
the name of a .dat file that is used to load saved data
into a userform.

Is there a way that I can specify the directory that is
opened in the dialog box? I'm afraid the users will not
know where to look otherwise.

I have been able to specify the directory when using
GetSaveAsFilename to save these same .dat files.

Cheers.



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
Using filename retrieved from GetOpenFilename Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 2 September 12th 08 07:47 PM
GetOpenFilename not returning a usable variable Lilivati Excel Discussion (Misc queries) 2 June 26th 06 09:02 PM
GetOpenFilename - Problem Tom Excel Programming 2 August 4th 03 07:52 PM
GetOpenFilename and arrays Shunt Excel Programming 1 July 31st 03 04:26 PM
GetOpenFilename Daniel[_4_] Excel Programming 3 July 27th 03 11:00 AM


All times are GMT +1. The time now is 03:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"