Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Default Path for File Open | Excel Programming | |||
Default File Path | Excel Programming | |||
Applicaition Default File Path | Excel Programming | |||
Default File Path | Excel Programming | |||
Default File Path | Excel Programming |