Close the Excel Application

  • Thread starter Thread starter ahyui
  • Start date Start date
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.
 
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
 
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
 
Back
Top