Applicaition Default File Path

  • Thread starter Thread starter Greg Bloom
  • Start date Start date
G

Greg Bloom

In Excel - my 'Default File Location' is C:\Data

In my VBA Code:
I set the Application.DefaultFilePath = "C:\OE"
I then set File_Name = Application.GetOpenFilename(filefilter:=Filt,
FilterIndex:=FilterIndex, Title:=Title)

But it always goes to the last data path that was used to open a file in
Excel. I can not get the new default path (C:\OE) to work in the the
GetOpenFileName.

Thanks
Greg Bloom
 
Hi Greg,
In my VBA Code:
I set the Application.DefaultFilePath = "C:\OE"
I then set File_Name = Application.GetOpenFilename(filefilter:=Filt,
FilterIndex:=FilterIndex, Title:=Title)

Use:

Chdrive("C:")
ChDir("C:\Data")
then do the getopenfilename

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com
 
Back
Top