I have a macro that saves my workbooks into a backup directory. The problem with it is on each backup, it over writes the old backup. So I thought I would make a new macro to create a new directory and save the files there thus leaving the old backup intact. The problem is getting the files into the new directory. Here is a sample of the code I am using.
The last line is not working and I have tried many variations of it but can't seem to get it right. I can get it to save a copy with both the new directory and the file name combined, but not get it into the newly created directory.
Any ideas?
Thankyou in advance.
Roy
Code:
MkDir "C:\MovieDB\Backup\Backup on " & Format(Now(), "mm_dd_yyyy hh mm AMPM")
NewDir = "C:\MovieDB\Backup\Backup on " & Format(Now(), "mm_dd_yyyy hh mm AMPM")
ActiveWorkbook.SaveCopyAs "NewDir\MovieDB.xls"
The last line is not working and I have tried many variations of it but can't seem to get it right. I can get it to save a copy with both the new directory and the file name combined, but not get it into the newly created directory.
Any ideas?
Thankyou in advance.
Roy