Close the Excel Application

A

ahyui

When I close the active workbook with VBA as follow:
Windows("test.xls").Close Savechanges:=False

I can close the workbook successfully but the Excel Application is still
exist (although there is no any Excel workbook opened). How can I close the
workbook with the Excel Application close also.

Thanks for your kinkly assistance.
 
R

Rob van Gelder

Sub testit()
Application.DisplayAlerts = False
Application.Quit
End Sub

I've included the DisplayAlerts statement because Excel could ask you
whether you want to save Workbook changes first.

Rob
 
E

Edwin Tam

Add the line

Application.Qui

----- ahyui wrote: ----

When I close the active workbook with VBA as follow
Windows("test.xls").Close Savechanges:=Fals

I can close the workbook successfully but the Excel Application is stil
exist (although there is no any Excel workbook opened). How can I close th
workbook with the Excel Application close also

Thanks for your kinkly assistance
 
Top