I have a vba macro which runs a loop for about 200 iterations, using up the ram page file as it runs. I need some kind of quick fix to clear the page file after every iteration. I know the best fix would be to clean up the code, but time is a constraint here.
+2
A:
At the end of each loop iteration set any objects that will be re-created to Nothing
.
This article explains it in detail.
Mitch Wheat
2008-10-29 05:53:44
The Nothing tip is useful, but this function has too many cyclical references. Need to clean up the code.
2008-10-29 08:17:25
A:
I've never seen this happen. It sounds like you have an ever-expanding array and may be running out of memory. I would stop it in a few places during the run, to see what is happening.
dbb
2008-10-29 07:19:44