+ Reply to Thread
Results 1 to 2 of 2

Problem with the macro slowing down

  1. #1
    Registered User
    Join Date
    03-30-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    1

    Problem with the macro slowing down

    Hi everyone,

    i've got a macro that every 20 seconds copies data from one spreadsheet to the others and saves changes in a TXT files (which are located on a remote server). The problem is that after a while the macro starts slowing down and finally freezes, though i don't get any error or "no response" mesage. I noticed that the slowdown is correlated with increase of process memory usage to about 185 000 K.

    Does anybody knows what is wrong and is there possibility to fix this?

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor PingPing's Avatar
    Join Date
    02-19-2010
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    158

    Re: Problem with the macro slowing down

    It sounds like either you're not closing all of the workbooks you open (ie. 'BAZA') or, when they are closed, Excel is not releasing memory (ie. a memory leak).
    I'd recommend stepping through your code line-by-line (F8) and watching what happens to EXCEL's memory usage when objects are create (eg. workbooks are opened) and when they're destroyed (eg. workbooks are closed).

    btw, the Activate/Copy/Paste code is functional, but ugly. You could improve it by a combination of Workbook and using Range objects, eg:

    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)

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