LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
opi opi is offline
external usenet poster
 
Posts: 4
Default Problem with default file path

Hi everybody! My problem is this: I acces MS Excel from Visual Basic.
First I create Excel.Application object, and then I prompt user to open
a file. I do this with FindFile method. Upon execution of that method,
open dialog box is displayed which points to MyDocuments folder.
However, I would like to set the default path programatically.I tried
to do it by setting DefaultFilePath (and by doing chdir) before
executing FindFile, but it appears excel writes the default path to the
registry upon opening of the file, and only looks for that value.

For example: I set default path to c:\temp and open excel. Open dialog
points to c:\My Documents. I navigate to c:\temp and open any file from
there. Then I start my program again, I set default path to c:\work,
open dialog box now points to c:\temp because that is what excel has
written to registry
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\E xcel\Options the last
time.

I have tried using GetOpenFilename but same thing happens. Is there a
workaround for this other than using CommonDialog control or writing my
path dinamically to the registry because none of that seems very
appealing...

 
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
Default Path for File Open gilgil Excel Programming 2 March 6th 05 10:36 AM
Default File Path Kevin Excel Programming 2 September 28th 04 05:09 PM
Applicaition Default File Path Greg Bloom Excel Programming 2 July 12th 04 06:37 PM
Default File Path papou[_9_] Excel Programming 0 July 8th 04 02:49 PM
Default File Path Tom Ogilvy Excel Programming 0 July 8th 04 02:38 PM


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