Reputation: 11
I'm running some VBA commands, it works properly but sometimes excel crashes when I try to close it. It looks like Excel is not cleaning the TEMP file that is being created. Anyone knows how to solve it? VBA code is big but it is always like: Open files, copy values, close files.
https://i.sstatic.net/k23pW.png https://i.sstatic.net/NVl4S.png
Upvotes: 0
Views: 1393
Reputation: 3255
Excel has a habit of crashing if you are not super-clean when handling its objects. Be sure to Close everything properly AND set it to Nothing when you are done. NEVER use the implicit objects, ALWAYS create your own and call them by full name. Otherwise Excel will create some behind-the-scenes objects that you CAN'T close properly because they are not visible.
Upvotes: 3