Save/Close message in Excel RRS feed

  • Question

  • I want to be able to display or inhibit the "save/close" message when I save/close a workbook.

    this is the message which asks a user if they want to save the file before closing.

    what VBA code is required for this?

    thanks in advance

    Monday, October 12, 2015 2:59 PM


  • Sub CloseBook() Application.DisplayAlerts = False ActiveWorkbook.Close Application.DisplayAlerts = True End Sub


    Sub CloseBook2()
        ActiveWorkbook.Close savechanges:=False
    End Sub

    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    • Marked as answer by py1 Tuesday, October 13, 2015 7:57 AM
    Monday, October 12, 2015 6:50 PM