+ Reply to Thread
Results 1 to 6 of 6

Start and End Excel files.

  1. #1
    Registered User
    Join Date
    03-07-2013
    Location
    Long Beach, WA
    MS-Off Ver
    Excel 2013
    Posts
    87

    Start and End Excel files.

    I have a large number of Excel files. Each one gathers download data and they all feed a summary worksheet.
    There are so many of these files that one cannot open all of them at the same time. I don't know why as the computer has plenty of RAM.
    But, running them sequentially would be fine.

    The files already have Auto_Open macros that take care of all the necessary operations .. except closing.
    I'd prefer to not have the macro also close the file unless it could be conditional. That's so I can open and work on the file if necessary. But maybe I could use CTRL-BRK to stop it before it closes should I need to work on it / them?

    Another approach might be to run 5 or 10 of them and then close Excel and start the next batch of 10, etc. But that might make some files different and there is great benefit in having them all the same.
    Well, unless closing Excel from outside would be a possibility.

    I'm not averse to doing a little programming but I need to know I'm headed in a reasonable direction.

    Any suggestions how to do this? I've read a bit about this but the real issue doesn't seem to be solved or at least a solution that's easy to find.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,033

    Re: Start and End Excel files.

    How about an input box that asks if you would like to close the file. If yes, then close the file, if no then exit sub.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    03-07-2013
    Location
    Long Beach, WA
    MS-Off Ver
    Excel 2013
    Posts
    87

    Re: Start and End Excel files.

    The thing is supposed to run without interaction from start to finish. Now, if the input box entry were YES by default with a wait time associated with it then that would work. But, I'm not well versed in building such a thing.

  4. #4
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    422

    Re: Start and End Excel files.

    I have several spreadsheets that open, run macros and close automatically when run as administrator, but when opened as another user (i.e. me) they open normally. (Or I may put a condition like if it is opened before 7AM then run the macros and close, otherwise open normally). In most cases I do this, the spreadsheets are run as scheduled tasks overnight (before 7AM).

    Try something like this in Workbook_Open
    Please Login or Register  to view this content.
    You'll also need to put this function in a Code Module
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-07-2013
    Location
    Long Beach, WA
    MS-Off Ver
    Excel 2013
    Posts
    87

    Re: Start and End Excel files.

    The Function didn't seem to work for some reason.
    I'd like to pursue the time of day approach.

  6. #6
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    422

    Post Re: Start and End Excel files.

    Oops... I missed something important! Add the first line to your code, and it should then work.
    Please Login or Register  to view this content.
    Here's a version of the Workbook_Open code I use to run by time.
    Please Login or Register  to view this content.

+ 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. Excel 2007 : Lost Recent Files in Start Menu
    By darrengould in forum Excel General
    Replies: 1
    Last Post: 08-14-2012, 02:52 AM
  2. Replies: 1
    Last Post: 12-13-2011, 08:58 AM
  3. [SOLVED] Unable to start up my Excel files
    By Delbert in forum Excel General
    Replies: 3
    Last Post: 01-30-2006, 06:25 PM
  4. Unable to start my Excel files
    By Delbert in forum Excel General
    Replies: 3
    Last Post: 01-30-2006, 06:00 PM
  5. applicaitons/files that start with Excel
    By Michael31 in forum Excel General
    Replies: 4
    Last Post: 09-13-2005, 04:05 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