Quote Originally Posted by crowdx42
What I am going to try is the code below. Hopefully it will work.
Patrick

Sub set_default_directory()
Application.DefaultFilePath = "F:\Daily Report"
End Sub
Hi,

reading other posts, the line (quote) "DefaultFilePath only changes the folder which Excel will use the first time it is opened for a session. To change the current path for the next file open, you need to use ChDrive and ChDir" would suggest it wouldn't work (as you discovered).

from my own code,
 With fs
        .NewSearch
        .LookIn = InputBox("Enter the path of the folder containing the required files", "Enter a Path", "C:\Valley\Test\")
        .SearchSubFolders = True
        .Filename = "*." & sFileType
presents the user with a default folder, and allows change, however you are after a way to automate that back to the correct (of your predetermined) choice folder?

If .LookIn were set to the FilePath of a known folder/file this would avoid you using the (current) default folder.

Question, do you know (within the code) the folder you want, or can you search for it?

Is this heading in the direction to solve your problem?

---