Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets(1).Visible = False
Application.EnableEvents = False
Application.DisplayAlerts = False
ThisWorkbook.Save
Application.DisplayAlerts = True
Application.EnableEvents = True
Sheets(1).Visible = True
Cancel = True
ThisWorkbook.Saved = True
End Subcitovat