Quit Method

       

Quits the application. This method does not save any changes that have not been previously saved using the Save or SaveAs commands, but immediately exits the active application.

expression.Quit

expression   An expression that returns an Application object.

Example

This example quits the application without saving any changes that were made since the previous Save or SaveAs commands were executed.

Private Sub QuitApp()
    Application.Quit
End Sub