MrRhodes2004
12-09-2016, 06:18 AM
Group,
We have developed an intense spreadsheet. Though, only sometimes when the spreadsheet is closed an Out of Memory error occurs. When VBA has been unlocked and opened it shows the error. However, when a user gets the same error the VBA is closed and protected but the error still tries to open VBA anyway.
This error only happens during close and I have not been able to trap the error as it seems to happen after all the code has been executed.
Before exit, I delete all variables (even though they are only sub level and should have been killed at the end of the routine). I unload all forms that might be open. Based on interweb suggestions, I now use VBA in a non-maximized screen and "clear all breakpoints" before saving. I also have also just added "On Error Resume Next" to the end of workbook close and pre-close subs.
But I sometimes still get the error. Since the spreadsheet is being used in many countries by different users, I do not know what types of machine is being used.
Any suggestions on how to either prevent the out of memory error from showing at all or how to purge the cache or something?
Thanks...will try anything (well, almost)!
We have developed an intense spreadsheet. Though, only sometimes when the spreadsheet is closed an Out of Memory error occurs. When VBA has been unlocked and opened it shows the error. However, when a user gets the same error the VBA is closed and protected but the error still tries to open VBA anyway.
This error only happens during close and I have not been able to trap the error as it seems to happen after all the code has been executed.
Before exit, I delete all variables (even though they are only sub level and should have been killed at the end of the routine). I unload all forms that might be open. Based on interweb suggestions, I now use VBA in a non-maximized screen and "clear all breakpoints" before saving. I also have also just added "On Error Resume Next" to the end of workbook close and pre-close subs.
But I sometimes still get the error. Since the spreadsheet is being used in many countries by different users, I do not know what types of machine is being used.
Any suggestions on how to either prevent the out of memory error from showing at all or how to purge the cache or something?
Thanks...will try anything (well, almost)!