View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Hank Scorpio Hank Scorpio is offline
external usenet poster
 
Posts: 103
Default Setting default directory prior to GetOpenFilename

On Tue, 2 Sep 2003 02:17:11 -0700, "David R"
wrote:

When using GetOpenFilename the panel displays files in a
particular directory, but I want it to open displaying the
files in a sub-directory of that one. I have tried using
ChDir to set the default, but it doesn't work (probably
because my directory paths are all in UNC form). How can
I change the default directory prior to calling
GetOpenFilename?


I can't say that I've had that kind of problem with ChDir myself. Have
you tried this syntax:

chdir curdir & "/SubfolderName"

That may help to resolve the problem, since it'll use whatever the
current PC sees as the current path, regardless of the UNC path.

Usually the only "Gotcha" with ChDir is that it won't work if the
directory that you want to set as the current one is on a different
DRIVE to the current one. In that case you need to use a ChDrive
command first. However if the parent folder is opening when you use
the GetOpenFileName method, that's unlikely to be the problem here.


---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *