Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = False ThisWorkbook.Save Application.DisplayAlerts = TrueEnd Sub