I use this code
And it stops at Private Sub Workbook_BeforeClose when I save the file
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Log").Visible = True
Sheets("Log").Select
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
ActiveCell = Environ("username")
ActiveCell.Offset(0, 1).Select
Selection.FormulaR1C1 = "=NOW()"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Log").Visible = xlVeryHidden
Sheets("Marketing budget").Select
Range("Table1[[#Headers],[Projekt]]").Select
End Sub
Private Sub Workbook_BeforeClose()
Sheets("Account").Select
Range("account[[#Headers],[Account]]").Select
End Sub