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

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’
 
P

Peter T

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
 
G

Gary Brown

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
 
G

Gary Brown

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.
 
C

Chip Pearson

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)
 
D

Dave Peterson

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.
 
Top