If you want to make sure that all changes are saved when the workbook closes
Private Sub Workbook_BeforeClose(Cancel As Boolean) If Not ThisWorkbook.Saved Then ThisWorkbook.Save End If End Sub