I want to close the workbook using Excel VBA but I want to disable DisplayAlerts.
I am using the following code:
Sub Close_Worksheettwo()
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.Quit
End Sub
However, VBA closes only the ActiveWorkbook and the Application(Excel) remains open. There are no syntax errors.
What's happening?