+ Reply to Thread
Results 1 to 3 of 3

Macro taking longer every run

  1. #1
    Ron
    Guest

    Macro taking longer every run

    Hi Guys,

    Can anyone tell me why a macro should take longer everytime I run it?

    I have a bit of code, nothing special, that web queries about 500 rows of
    data, 4 columns wide. The macro reduces this to about 100 rows and then
    copies to a new sheet.

    I have set it to a test of 5 days days, so 5 web queries each run.

    It seems that if I continuosly run this macro, ie over the same set of data
    it takes about 7 seconds longer each time.

    So first run is 12 seconds, next is 19 then 25, 31,39,46 and 53.

    If I close excel completely and open it and try again it reverts to the 12
    seconds first run.

    Any idea why this is?


    Regards,

    Ron

  2. #2
    Norman Jones
    Guest

    Re: Macro taking longer every run

    Hi Ron,

    See the MSKB Article # 319998
    'BUG: Memory leak occurs when you query an open Excel worksheet
    by using ActiveX Data Objects (ADO)'

    http://tinyurl.com/nexcb


    ---
    Regards,
    Norman



    "Ron" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Guys,
    >
    > Can anyone tell me why a macro should take longer everytime I run it?
    >
    > I have a bit of code, nothing special, that web queries about 500 rows of
    > data, 4 columns wide. The macro reduces this to about 100 rows and then
    > copies to a new sheet.
    >
    > I have set it to a test of 5 days days, so 5 web queries each run.
    >
    > It seems that if I continuosly run this macro, ie over the same set of
    > data
    > it takes about 7 seconds longer each time.
    >
    > So first run is 12 seconds, next is 19 then 25, 31,39,46 and 53.
    >
    > If I close excel completely and open it and try again it reverts to the 12
    > seconds first run.
    >
    > Any idea why this is?
    >
    >
    > Regards,
    >
    > Ron




  3. #3
    Ron
    Guest

    Re: Macro taking longer every run

    "Norman Jones" <[email protected]> wrote in
    news:[email protected]:

    > http://tinyurl.com/nexcb


    Thanks Norman.

    As I'm not using ADO it isn't a complete explanation. However I'm sure
    there's some connection there as I also have to close excel to get the
    runtime back to a basic 12 seconds.

    I initially thought it might be the clipboard filling up but that proved
    not to be the case when I manually cleared it after every run.


    Thanks again

    Ron

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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