View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jared Jared is offline
external usenet poster
 
Posts: 109
Default Pivot Cache Memory

I'm running the following code to attempt to determine the mommeory usasge
used by a Pivot Cache connected to an external file.

Sub PVcashMem()
Mused = Round(Application.MemoryUsed / 1000000)
MsgBox ("Memory Used= " & Mused & " MBs")
For Each PC In ActiveWorkbook.PivotCaches
Mused2 = Round(PC.MemoryUsed / 1000000, 1)
MsgBox ("PC Memeory Used=" & Mused2 & " MBs")
Next PC
End Sub

The application is using 22MBs. However one pivot cache is using 12.6 MBs
and the other pivot cache is using 13.3 MBs for a total of 25.9MBs. This
seems to be a contradiction. Can anyone give me a quick lesson in pivot cache
memory management?