+ Reply to Thread
Results 1 to 16 of 16

Excel Slow down and Memory hog!!

  1. #1
    Forum Contributor mongoose36's Avatar
    Join Date
    06-10-2013
    Location
    Lincoln
    MS-Off Ver
    Excel 2013
    Posts
    389

    Excel Slow down and Memory hog!!

    Hi guys, I've built an excel file that eats memory until it crashes. I have set calculations to manual, but the problem persists so I'm left with it being my macros. Is there any way to test my vba to see if the code is causing the memory use. It's very strange I can watch task manager and see the memory usage climb as I click from one tab to the next until it crashes. If I stop ... the excel processes keeps the memory and doesn't release it.

    Any help is appreciated!

  2. #2
    Forum Contributor
    Join Date
    11-15-2012
    Location
    Buffalo, NY
    MS-Off Ver
    Office 365
    Posts
    286

    Re: Excel Slow down and Memory hog!!

    Hi cp

    You don't mention if you are using lots of objects (and their associated Set Object=something), but if you are, and are not releasing them, you may be running into memory problems.

    Also, if you have heavily recursive structures (recursive procedures or functions) these can sometimes create problems.

    Easiest to get help would be to post a copy of your spreadsheet..although I don't know how many people would like to deliberately slow their machines down that much

    HTH

    Tony

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Excel Slow down and Memory hog!!

    here are a few things to check...
    any dynanic formulas
    Array (or regular) formulas that use entire rows/columns
    Conditional formatting over large areas
    data that sits right out in the middle of nowhere in a sheet
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor mongoose36's Avatar
    Join Date
    06-10-2013
    Location
    Lincoln
    MS-Off Ver
    Excel 2013
    Posts
    389

    Re: Excel Slow down and Memory hog!!

    Thanks for the responses guys!!

    I have attached a stripped down copy of the file. I deleted a bunch of tabs, but the original will only slow down excel if you click from tab to tab, but it doesn't slow down the rest of the computer because of the 2gb cap on 32 bit applications.
    Time Card Template Take 2.xlsm


    Tony -- I'm not using any objects in my VBA, I have some variables, but I set them to nothing at the end. I do have a recursive custom function in Macro 2, but in my previous tests I had eliminated this and nothing

    Ford -- I had eliminated formulas as a contributor by setting calculations to manual. After I did this the problem still persisted.

    Unless I'm missing something.

    Caleb

  5. #5
    Forum Contributor
    Join Date
    11-15-2012
    Location
    Buffalo, NY
    MS-Off Ver
    Office 365
    Posts
    286

    Re: Excel Slow down and Memory hog!!

    Hi Caleb

    The spreadsheet you sent seems to use an awful lot of hyperlinks to get to a simple cell on a different sheet. Is there some underlying reason for this?

    Tony

  6. #6
    Forum Contributor mongoose36's Avatar
    Join Date
    06-10-2013
    Location
    Lincoln
    MS-Off Ver
    Excel 2013
    Posts
    389

    Re: Excel Slow down and Memory hog!!

    Oh gosh!! I forgot about the hyper links. I suppose the links aren't really necessary. I will try to remove them and see if that helps. The idea was to make it easy for the manager to view an overview and drill down if necessary, but it really only avoids a couple of clicks. Although I have other files that have the hyperlinks that work just fine.

  7. #7
    Forum Contributor mongoose36's Avatar
    Join Date
    06-10-2013
    Location
    Lincoln
    MS-Off Ver
    Excel 2013
    Posts
    389

    Re: Excel Slow down and Memory hog!!

    Removed the hyperlinks and no help

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Excel Slow down and Memory hog!!

    Hi cplettner

    Add this Code to the ThisWorkbook Module...it seems to help a bit
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  9. #9
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Excel Slow down and Memory hog!!

    Add new module with this code:
    Please Login or Register  to view this content.
    then run. This will solve this problem, but you must also correct your Fixit routines which have an additional End Sub line in them.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  10. #10
    Forum Contributor mongoose36's Avatar
    Join Date
    06-10-2013
    Location
    Lincoln
    MS-Off Ver
    Excel 2013
    Posts
    389

    Re: Excel Slow down and Memory hog!!

    Thank you! Thank you! Thank you!

    Izandol -- do I call this sub or just run it periodically? Perhaps on activate a new worksheet?

  11. #11
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Excel Slow down and Memory hog!!

    It will only require running one time (unless this same problem occurs again).

  12. #12
    Forum Contributor mongoose36's Avatar
    Join Date
    06-10-2013
    Location
    Lincoln
    MS-Off Ver
    Excel 2013
    Posts
    389

    Re: Excel Slow down and Memory hog!!

    Wow!!! that worked like a charm! Would you indulge a nubie and explain what happened.

  13. #13
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Excel Slow down and Memory hog!!

    I can not say how your workbook arrived in this state but there were many thousands of hidden shapes on each sheet. The code simply deletes them.

  14. #14
    Registered User
    Join Date
    01-09-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Excel Slow down and Memory hog!!

    I have a similar problem with thousands and thousands of hidden shapes in my sheet. Deleting all shapes isn't an option as i do need many shapes to be there.
    Is there a non-vba way to identify hidden shapes and delete them manually (en-masse if necessary).

    Regards

    Ken

  15. #15
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Excel Slow down and Memory hog!!

    It may be simpler to copy the shapes you wish to keep to a new sheet, then delete all shapes from the problem sheet before putting those shapes back to the sheet.

  16. #16
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Excel Slow down and Memory hog!!


    Hi,

    when an entire row is deleted, the shape on this row isn't deleted but remains as a ghost shape :
    its dimensions are set to zero !

    So to delete ghost shape, just test its height is equal to zero !

+ 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: 12-08-2011, 08:52 AM
  2. Need VBA to find out memory and virtual memory used by thread
    By Yozhik in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2011, 08:31 AM
  3. Excel Memory?
    By Stattfinder in forum Excel General
    Replies: 2
    Last Post: 12-16-2010, 12:27 PM
  4. [SOLVED] Excel gone out of memory
    By pinkyundbrain2000 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2006, 08:55 AM
  5. [SOLVED] Routine running slow (memory leak?)
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-01-2006, 07:25 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