I have used the following without success. The active workbook closes, indeed, but the excel window remains open.
Application.ActiveWindow.Close SaveChanges:=False
ActiveWorkbook.Close SaveChanges:=False
Which is the command that terminates the application?
EDIT
To say a little more: In the workbook Open event I run a macro. I want to terminate the application when that macro finishes. I also tried this without success.
Private Sub Workbook_Open()
Macro_MyJob
Application.Quit
End Sub
Where should I put this Application.Quit command?