We help IT Professionals succeed at work.
Get Started

Excel 2010:  Not releasing memory when workbooks closed

Last Modified: 2017-04-30
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.
Watch Question
This problem has been solved!
Unlock 1 Answer and 12 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE