Sunday 25 February 2018

How to close an Excel file without saving in VBA | VBA workbook close without saving


Sometime you will have to disable the SAVE AS pop up on your Excel files to stop users asking to save the file.

You can use below code to do that.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
    ThisWorkbook.Saved = True
End Sub

No comments:

Post a Comment