View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Problem with default file path

opi,
I seems like we are talking different things.
You're referring to Application.defaultpath, which determines the folder
when you click FileOpen, or a similar method.
I would imagine this is set when excel opens and even if changed would be
seen until the next time Excel is opened.
I am referring to application.getOpenFileName, which honours the CurDir
value.

NickHK

"opi" wrote in message
oups.com...
NickHK,
Thanks for your reply. I forgot to mention that I do use chdrive and
chdir, and I check for validity of the path with dir (not ideal, but
let's say that my path will always be valid). Problem is that no matter
what I set as DefaultFilePath, Excel uses the path set in the registry,
and after I navigate to desired folder and open a file there Excel
writes that path to the registry.