+ Reply to Thread
Results 1 to 2 of 2

Clearing pivotcaches and other memory

Hybrid View

  1. #1
    Registered User
    Join Date
    07-01-2010
    Location
    Portland, OR, USA
    MS-Off Ver
    Excel 2007
    Posts
    39

    Clearing pivotcaches and other memory

    Hello,

    Please see this thread for a more detailed background on my problem: http://www.excelforum.com/excel-prog...rge-files.html

    Basically I'm confused about how memory works in Excel. When I open my workbook, it uses around 40,000K in the task manager. After running my macro (which imports remote files and analyzes them), it's gone up to about 260,000K. Even if I delete all the changes that were made to the workbook, and all the new sheets that were added, the memory usage stays the same. What is going on?

    Has anyone seen anything about Excel crashing when it tries to clear pivotcaches before saving? I noticed that my program crashes before saving if these lines are active, but does not crash if they are commented out:
     ActiveSheet.PivotTables("PivotTable1").PivotSelect "", xlDataAndLabel, True
        Selection.ClearContents
    Any insight much appreciated.

    Thanks,
    -Joe

  2. #2
    Registered User
    Join Date
    07-01-2010
    Location
    Portland, OR, USA
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Clearing pivotcaches and other memory

    OK, so I changed my code so that it opens a temporary workbook to do all the importing/analysis work, and then just copies the results into the original workbook and closes the temporary one. I'm still seeing the huge increase in memory usage though. Can anyone explain this?

    -Joe

+ 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