Forum Discussion
VBA memory does not clear after closing workbook
Do all PCs have the same macro settings in Excel?
This could be an issue when different Office versions access the file.
At the same time, please check whether clicking the "Reset" button in the "Debug" toolbar helps. this also deletes all static and project-wide variables. Running the VBA END command in a macro should have a similar effect. However, the macros and user forms must then be restarted, just like after opening the file.
With that I would also know at the end, hope that this information could help you.
I know I don't know anything (Socrates)
- SrednaNovaFeb 22, 2022Copper Contributor
Thank you very much for your answer.
All the PC's have the same macro settings.
Your remark about different Office versions made me look into this anyway though. I turns out there is a difference here.
I have 5 computers, 4 is on Windows 10 and 1 on Windows 11. Just for the record. The 5 versions of Excel are as follows:
- Version 2201 (Build 14827.20198)
- Version 2201 (Build 14827.20198)
- Version 2201 (Build 14827.20192)
- Version 2201 (Build 14827.20192)
- Version 2201 (Build 14827.20158)
The last on that is only on build 14827.20158 is the one that is working. It is also telling me that is has an update available. I suspect that if I update it then it would have the same problem, but of course I don't know for sure untill I try.
If this is a general bug in the new builds I would expect many people to experience it, but I have not been able to find anything on the problem by searching the internet.
Clicking the "Reset" button in the "Debug" toolbar does not help whether it is done prior to closing the workbook or after.