Avatar of koughdur

asked on 

Excel 2010: Not releasing memory when workbooks closed

I have an Excel VBA app that creates a number of other Excel workbooks.  It also opens/closes a number of workbooks in order to accomplish its tasks.  The app closes each workbook it creates and/or opens as soon as it is through working with it.  However, as the app executes the memory used by the Excel app continues to climb.  For some users it runs out of memory/resources before completing the task.

I have done some googling.  One recommendation is to modify the registry settings to disable logging.  However, this program has to run on multiple computers and changing this particular registry setting requires admin privileges which most users do not have.

Is there a way to get Excel to release the memory of a workbook when it's closed?

There are numerous workarounds to this problem (e.g. rewrite in another language, rewrite as a VB rather than VBA app, write a shell program that launches a new Excel app for each workbook processed, etc.)  However, this problem is affecting multiple VBA apps which were just recently dumped on me.  Having to rewrite all those scripts along with my regular duties would be daunting.

This is running on Windows 7.
VBAMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment

8/22/2022 - Mon