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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top