Application.filedialog--- default directory

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using the application.filedialog method to get a file. I want to set the
default directory where this dialog opens up... any ideas??

(*** I tried
chdrive "C:"
then
chdir "C:\whatever")

didn't seem to work
 
Tom:

One approach is to use the InitialFileName property of the FileDialog object
and set it equal to the directory without specifying an actual filename.
For example:

Dim fd As FileDialog

Set fd = Application.FileDialog(msoFileDialogFilePicker)

fd.InitialFileName = "h:\Program Files"
fd.Show

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


I'm using the application.filedialog method to get a file. I want to set
the
default directory where this dialog opens up... any ideas??

(*** I tried
chdrive "C:"
then
chdir "C:\whatever")

didn't seem to work
 
Back
Top