+ Reply to Thread
Results 1 to 6 of 6

PC becomes unresponsive when extracting data from MANY workbooks

  1. #1
    Registered User
    Join Date
    08-27-2012
    Location
    Saldanha, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    59

    PC becomes unresponsive when extracting data from MANY workbooks

    I have a macro which extract data from many workbooks into one workbook. My macro works fine, but after processing quite a few workbooks it suddenly slows down considerably. I don't understand why, I have a CPU and RAM widget on my desktop and it shows that my CPU usage always stay below 50% and my RAM usage between 60-70% where it's normally. So I don't know why it slows down. Below my code, any help will be much appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    06-04-2013
    Location
    Moscow
    MS-Off Ver
    Office 365
    Posts
    100

    Re: PC becomes unresponsive when extracting data from MANY workbooks

    Please Login or Register  to view this content.
    - wrong.
    You must use:
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    And you macro need to optimize. If you will be use a arrays - macro will be faster. After a while I will try to lay out the sample code

  3. #3
    Forum Contributor
    Join Date
    06-04-2013
    Location
    Moscow
    MS-Off Ver
    Office 365
    Posts
    100

    Re: PC becomes unresponsive when extracting data from MANY workbooks

    something like what:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-27-2012
    Location
    Saldanha, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: PC becomes unresponsive when extracting data from MANY workbooks

    In the mean time I have found that Task Manager shows that the memory used by EXCEL.EXE increase over time and it is when windows start to use the HDD when the macro slows down considerably. I then tried a different method, instead of opening each file, reading from it and then closing it again, I now use a query to read each file into the workbook. This solved the problem! The memory used by EXCEL.EXE did not increase. Anybody understands why opening and closing cause this? It seems as if excel is not releasing the memory when closing the file, why so?

  5. #5
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Pune
    MS-Off Ver
    Office 365 (Win 10)
    Posts
    489

    Re: PC becomes unresponsive when extracting data from MANY workbooks

    I use the following code to remove the copied data from the clipboard..
    May be u can use the same

    PHP Code: 
    Application.CutCopyMode False 

  6. #6
    Registered User
    Join Date
    08-27-2012
    Location
    Saldanha, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: PC becomes unresponsive when extracting data from MANY workbooks

    I use the following code to remove the copied data from the clipboard..
    My code do not make use of copy/cut, so I don't believe it's anything to do with the clipboard memory

+ 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