+ Reply to Thread
Results 1 to 4 of 4

clean method for closing excel file without leaving a shell or closing other excel files

  1. #1
    Registered User
    Join Date
    04-24-2020
    Location
    Stourbridge, England
    MS-Off Ver
    365
    Posts
    29

    clean method for closing excel file without leaving a shell or closing other excel files

    Hi all,
    I need to shut down an excel network file after 20 minutes. I initially used simple code like application.quit or the close method but often when closing an empty shell was left behind which was untidy. I tried a few things to no avail and finally settled on the below which works in so far as no shell but now often closes other excel files that are open at the same time.
    Can anyone suggest a cleaner more robust method please?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: clean method for closing excel file without leaving a shell or closing other excel fil

    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: clean method for closing excel file without leaving a shell or closing other excel fil

    On my computer (Windows 10) if there is a PERSONAL.XLS or PERSONAL.XLSB file that exists it counts as an open file.

    SubFolder in red below is User Dependent:
    Location: C:\Users\Owner\AppData\Roaming\Microsoft\Excel\XLSTART\personal.xls

    I modified sintek's code as follows:
    Please Login or Register  to view this content.
    Lewis

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: clean method for closing excel file without leaving a shell or closing other excel fil

    @ Lewis...

    Interesting...I've never made use of personal workbook so cannot test...
    Thanks for unexpected 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. Replies: 2
    Last Post: 12-30-2019, 06:07 PM
  2. VBA Project not closing after closing Excel file
    By GOGGS in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-29-2016, 10:26 AM
  3. Excel 2013 not closing after closing workbook
    By SBennett212 in forum Excel General
    Replies: 4
    Last Post: 04-04-2015, 11:07 AM
  4. Closing active Adobe Reader file that was created as a shell
    By scju72 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-11-2014, 05:09 PM
  5. [SOLVED] Closing all excel files
    By h0ps in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-04-2014, 04:37 AM
  6. Clean data when closing excel
    By CFT Brian in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-24-2013, 01:41 AM
  7. stopping or closing exe files from excel
    By petgrub_in_excel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-09-2005, 12:06 PM

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