Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
d = Format(Now(), "yyyy-mm-dd_HH.mm.ss") s = Left(ThisWorkbook.Name, InStrRev(ThisWorkbook.Name, ".") - 1) ThisWorkbook.SaveCopyAs "E:\test\" & s & "_" & d & ".xlsm"End Sub