Trouble setting Default Directory


Posted by Edward C. on July 27, 2001 12:47 PM

Hi
I wrote the following marco to set the default directory which the Open Icon takes me to, but it does not work. Does anyone have any ideas what I might be doing wrong.
Thanks
Edward

Sub SetWorkingDirectory()
' change the default working directory
' egc - 7/27/01 - trying to fix default path
'Application.DefaultFilePath = "\\IFCDT02NT\Engineering\Data\Discipline Indexes\Systems\Testing"
'MsgBox "The working directory has been changed to: " & _
' Application.DefaultFilePath
Application.DefaultFilePath = "\\IFCDT02NT\Engineering\Mercury\Discipline Indexes\Systems\Testing"
'MsgBox "The working directory has been changed to: " & _
'Application.DefaultFilePath
End Sub



Posted by Ivan F Moala on July 28, 2001 3:37 AM


Edward.....you need to change Drives 1st
As you are using a UNC convention..you may need
to supply the mapped drive letter eg

ChDrive "Y"

then try changing the Dir

ChDir "\\IFCDT02NT\Engineering\Mercury\Discipline Indexes\Systems\Testing"

Ivan