Thread: Opening Files
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Opening Files

spath = curdir
Chdrive Thisworkbook.path
chdir Thisworkbook.Path
fname = Application.GetOpenFilename()

.. . .
chdrive spath
chdir = spath


--
Regards,
Tom Ogilvy


"toocold" wrote:


Good morning all!

I am working on something that will allow a user to run different
scerios and view the results. Once they have something that they want
to explore further, they can export the results to a new workbook. If
they want to go back to an option that was previously exported, there
is a button on one of the user forms that will call the open feature
and let the user select which which files to open.

My issue is that the Application.GetOpenFilename feature seems to
default to the last place that the user saved any excel file. Even if
it is a different from where this one is located. Is there a way to
control this? I want it to default to wherever this workbook is saved
and let the user look there first.

Thanks in advance,
dw


--
toocold
------------------------------------------------------------------------
toocold's Profile: http://www.excelforum.com/member.php...o&userid=31608
View this thread: http://www.excelforum.com/showthread...hreadid=566090