Macro to exit

  • Hi


    The following code closes Excel without prompting for saving changes:


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


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


    HTH
    /Fredrik

Participate now!

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