+ Reply to Thread
Results 1 to 4 of 4

Excel application not closing

  1. #1
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Excel application not closing

    Hi all,

    I'm pulling my hair out with this. I have the below code which essentially saves a range on a workbook as a text file and then I want the code to shut Excel down completely (after saving the original file but not saving the WHHols file (which is what the name of the original file becomes after saving the range as a text file). The below code works fine I just can't get it to close everything without leaving a residue in Task Manager. I've tried all sorts of permutations without success.

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel application not closing

    Hi,

    Why not just put the Application.Quit immediately after the text file is saved?
    You're not subsequently saving the current workbook and there's no need for a Close event with the txt file since the application quit effectively closes everything anyway.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Re: Excel application not closing

    I would hug you if I could!! That was driving me to distraction. God bless you.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel application not closing

    My pleasure.

    Glad I could help and thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Closing an application
    By j_Southern in forum Excel General
    Replies: 2
    Last Post: 01-20-2012, 06:18 AM
  2. Closing Application without saving
    By stoney1977 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2008, 07:15 AM
  3. Closing application
    By walid66 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-12-2006, 09:59 PM
  4. Closing Excel Application
    By Inthi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2005, 08:05 AM

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