Colleagues! There is a code:
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = False Call ThisWorkbook.SaveAs("C:\_Temp\Test2\Version\Test2_" & Format(Now(), "DDMMYY") & "_" & Format(Time(), "hhmmss"), xlWorkbookDefault) Application.DisplayAlerts = True End Sub I would very much like instead of using the hard-coded path "C: _Temp \ Test2 \ Version \ Test2_" to do this automatically (maybe somehow with ThisWorkbook.Path), so that this code would be universal for any new book that requires saving a duplicate in the specified folder when closing the file (copied this universal code + created the folder ".. \ Version .." where this file lies and that's it). That is, in the folder ".. \ Version .." you will get something like a log ...
More interesting is that if you want the code -)
And another thing: now the files with the .xlsx permission are saved to the folder ".. \ Version ..", but it is necessary that with the permission of .xlsm