View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_5_] Jim Thomlinson[_5_] is offline
external usenet poster
 
Posts: 486
Default How do I close/exit Excel programmatically

application.displayalerts = false
application.quit

Make darn sure that you have saved everything before you run this code. It
closes things without asking if you would like to save.
--
HTH...

Jim Thomlinson


"Jesse" wrote:

I have several Excel files that I run automatically overnight. Excel remains
open after each file has run and closed. Thus, I have several sessions of
Excel open. This is a problem over the weekend. Is there something I can
add to the VB code that will close Excel after the file processing is done?