troubleshooting Question

Excel 2010: Not releasing memory when workbooks closed

Avatar of koughdur
koughdur asked on
VBAMicrosoft ExcelMicrosoft Office
12 Comments1 Solution1288 ViewsLast Modified:
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.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros