+ Reply to Thread
Results 1 to 3 of 3

How do I close/exit Excel programmatically

  1. #1
    Jesse
    Guest

    How do I close/exit Excel programmatically

    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?

  2. #2
    Jim Thomlinson
    Guest

    RE: 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?


  3. #3
    Tom Ogilvy
    Guest

    Re: How do I close/exit Excel programmatically

    Look in help at the Quit command

    --
    Regards,
    Tom Ogilvy

    "Jesse" <Jesse@discussions.microsoft.com> wrote in message
    news:D1A90B4B-6B6D-4B00-8942-FD182CD82F4A@microsoft.com...
    > 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?



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1