+ Reply to Thread
Results 1 to 2 of 2

Sequential events stopping halfway...

  1. #1
    Registered User
    Join Date
    12-02-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Sequential events stopping halfway...

    Hi All

    I was of the understanding that events in the Workbook module should run sequentially, however I have the following code which is stalling after the Sub 'PensionPriceDataExport'

    Basically the subs import a list of price data in CSV format, then after running some manual calculation, they export certain output data into a local directory as a csv, then purge all the data in each tab, and start the process again, but with a new index of fund price data.

    I used to run these events as an 'x minutes after workbook open' routine, with several minutes wait between each event, but I was told there was no reason to do this, and the next should execute after completion of the previous...

    Here's the code from This Workbook

    Please Login or Register  to view this content.
    The sub stalls after the first 'PensionPriceDataExport' has completed.

    The code for 'PurgeDataAuto' has basically been added onto the end of the previous sub, but either way, whether it is a standalone sub or the code is incorporated into the previous sub, after purging the data from the worksheets, it then stalls and is unable to continue to IndexListImporter again. (Which as you can see, it loads several times...)

    Is there anything obvious I am missing here? Is it related to running the same sub several times? (I.e. it is ignoring it, because it is of the same name...)

    Many thanks for your help
    Last edited by Bigjet; 10-26-2015 at 09:14 AM. Reason: Typo and wrong code tags

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Sequential events stopping halfway...

    "I was told there was no reason to do this"
    Apparently, you were told wrong.

    Its not uncommon for Excel to need to "settle" after a large import. Pehaps putting some Wait commands in-between the calling the subs would work.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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: 1
    Last Post: 03-04-2015, 01:23 AM
  2. VBA Issue: Code only runs halfway than stops.
    By TomToms in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-14-2014, 08:43 AM
  3. Macro for vlookup (halfway there)....
    By leswes14 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2013, 01:29 PM
  4. Nested If statement Help! halfway got it figured out
    By T_BOLT in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-26-2013, 02:41 AM
  5. Formula works halfway?
    By hottxboi16 in forum Excel General
    Replies: 1
    Last Post: 10-25-2006, 11:15 AM
  6. Macro running halfway only
    By Joe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2006, 01:55 PM
  7. if month is less than halfway over subtract 1
    By coal_miner in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-04-2005, 11:06 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