Clear cache and variables at the beginning of the macro
Solvedsormick -
Hello,
I notice that after several executions of my macros, at some point my spreadsheet crashes because too much memory is being used (probably due to unemptied variables including Global variables).
My problem is that I have an impressive number of modules and macros to check. The list of variables to verify would be so long that it would take me several weeks to check everything.
Is there a process that really allows me to free up Excel's cache and the variables at the beginning of my macro execution without having to check all my variables?
4 réponses
Hello,
What do you do to fix the situation? Do you save your file, then reopen it?
My file becomes slow after several executions and eventually crashes at some point.
Then I restart it and inevitably lose data.
I don't want to recover the data after the bug because it automatically renames my files during the recovery, which I don't want.
I have too many variables and objects to check. There are hundreds of modules and probably several hundred variables and objects to check. Restarting Excel resolves the issue, but I would like to clear the cache without having to restart the workbook.
My question is: is it possible to clear all variables and objects without having to check them one by one? A sort of shortcut, in a way; if that is possible.