Solved

Memory MGMT in Excel VBA ???

Posted on 2007-04-03
3
792 Views
Last Modified: 2012-05-05
How do I clean up memory in Excel VBA? I've tried setting objects to "Nothing" but I get an error stating that this is an invalid use of an object.

My VBA Macro calls a third party API which returns numerous strings that are huge in size. The Excel workbook end up taking up 60-80 mb of RAM. How can I get excel to release all objects?
0
Comment
Question by:jbravo223
3 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 18843252
If the API returns strings, then the only thing you can do is set the string variables equal to vbnullstring or "". Other than that and setting objects to Nothing, control over memory management is pretty much non-existent in VBA.
Regards,
Rory
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question