Macro to exit

  • Hi

    The following code closes Excel without prompting for saving changes:

    Sub CloseApp()
        With Application
            .DisplayAlerts = False
        End With
    End Sub

    If you want Excel to ask for saving changes, remove the .DisplayAlerts line.


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!