+ Reply to Thread
Results 1 to 4 of 4

VBA stops

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

    VBA stops

    Please bear with me as this is a rather general question:
    I have a somewhat large workbook which is duplicated many times with different data.
    I have a "summary" workbook which has data linked in from all those others. It contains a list of all the data files.
    I have an "update" process in the "summary" workbook which goes through the list of data files in the "summary" and runs them one at a time.

    I believe it's fair to say that the code is "proven" to a large degree.
    The process works ... almost:
    There are over 200 "data" files and with full options turned on, includes 2 or 3 runs of Solver each. So, it takes 2-3 minutes per file to execute.
    This worked over night for nearly all the files until it stopped with "Code execution has been interrupted".
    Now I can continue the process by selecting "Continue" 5 or 6 times per file.
    The code lines where it stops aren't always identical so here are a couple of examples of ONLY the lines where it stops:

    Please Login or Register  to view this content.
    and
    Please Login or Register  to view this content.
    "

    Over the development of this, I have done these things:
    - Turned off all COM addins
    - Selectively (but perhaps not as intelligently as you might) added DoEvents statements
    Both of these seemed to help but the problem is obviously not entirely solved.
    So, I wonder if there are other similar things that I might be thinking about in order to fix this annoying transient problem?

    The computer has 16GB of RAM and, in the past but not now, I've seen rather huge amounts of memory used up as if there were a memory leak.
    So, that doesn't seem to be happening now. I mention it for completeness.

    Also, it appears that the process was "broken" when one of the files returned unexpected results. Why this should affect the subsequent file processing is a mystery to me.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: VBA stops

    You might download and run appspro's CodeCleaner. I've used it for years, and it has often fixed squirrely problems.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: VBA stops

    Now I can continue the process by selecting "Continue" 5 or 6 times per file.
    I’ve read about somebody who had a similar problem with running Solver over night as it stopped quite often.

    His solution to the problem was quite simple. After starting the macro run he weighted down the keys “Alt” + “C” (equal to the Continue command for solver) and this worked in his case.

    Worth a try perhaps?

    Alf

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

    Re: VBA stops

    It doesn't appear that it's stopping in the Solver. It's stopping in the VBA code at rather odd points .. see the list of statements above.
    But, the idea may have merit - but not one that a software guy would want to use perhaps.

+ 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. VBA - Loop stops too soon
    By DavidBW in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-24-2013, 06:42 AM
  2. Tab stops in the Immediate Window?
    By PingPing in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-02-2010, 06:50 AM
  3. If-Else just stops
    By doctormelodious in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-16-2007, 08:03 PM
  4. Tab Stops / Tab Order
    By bkester in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-22-2005, 01:40 PM
  5. Tab Stops
    By brentm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2005, 03: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