Hello,
I'm using Excel 2013. I want to backup my active workbook to another destination. I'm trying to use the following code but it says <b>Runtime Error 70 permission denied</b>. Is there any other way to to backup my active workbook without having to use SaveAs?
Thank.
My code:
I'm using Excel 2013. I want to backup my active workbook to another destination. I'm trying to use the following code but it says <b>Runtime Error 70 permission denied</b>. Is there any other way to to backup my active workbook without having to use SaveAs?
Thank.
My code:
Code:
Sub backup_xlsm_file()
Dim SourceFile, DestinationFile
SourceFile = "E:\path1\Book1.xlsm"
DestinationFile = "E:\path2\Book1" & Format(Now(), "yyyy_mmdd") & ".xlsm"
FileCopy SourceFile, DestinationFile
end sub