Free Up More Memory or Reduce the amount <emory used in Excel 2003

  • Thread starter Thread starter Rene''48
  • Start date Start date
R

Rene''48

Hello Tech Suppport,

I am developing macros in Excel 2003.

I wanted to know if there is another command that will free up more memory
in the excel program without having to use Application.ScreenUpdating?

Thank you for your help.

Rene’
 
Disabling ScreenUpdating does not free up memory, except perhaps memory
associated with refreshing the display.

Ensure you release your objects and particularly large amounts of data in
variables (which do not otherwise go out of scope) when done. There's not
much to suggest without knowing anything about your code and what problems
you are experiencing.

Regards,
Peter T
 
One suggestion is to remember to release variables when not needed.
For example, if you...
Set strMyVariable = "Hello"
when you're done, don't forget to...
Set strMyVariable = nothing
 
Another thought is to be congnizant of the types of variables you are using.
Integers use less bytes than Long or Single which use less bytes than Double
or Currency which uses less bytes than Strings which use less bytes than
Variant, etc.
 
Set strMyVariable = "Hello"
when you're done, don't forget to...
Set strMyVariable = nothing

This is applicable only to public variables. With local variables
(declared within a sub), all memory is released when the variable goes
out of scope.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
No matter how much memory could be saved, I would always recommend using Long
(not integer) and Double (not Single).

I think that there's a better chance of stopping a worse error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top