I found a site that showed a way to make a copy of a file while the file was open. One of several, but this one works. How do I get the expression to save the copied file to the same folder as the original file? I have tried Application.currentproject.path in several combinations, but am missing something.
This is code that I found and am using, but need to change to save in same folder as current file.
Dim external_db As Object
Set external_db = CreateObject("Scripting.FileSystemObject")
external_db.CopyFile "C:\Users\GG\Documents\TypesExamplesHints\COPYLive DBfile.accdb", "C:\Users\GG\Documents\TypesExamplesHints\COPY _of _COPYLiveDBfile.accdb", True
Set external_db = Nothing
Using A2007 and A2003. Any help much appreciated. From various websites, I know that most people consider copying a live file a bad idea. But here, I have a good reason.