I have a large collection of excel files that work almost like a program, and they run on multiple computers (with different versions of windows), and as of latelly I have this bad problem, when the user presses my close button(actually a picture I associate a macro with), with the code calls:
ThisWorkbook.Close savechanges:=True
It causes 2 of the 4 supported computers to crach EXCEL (Windows XP = OK, Windows 10 = OK 1 BAD OTHER, Windows 8 = BAD).
I have isolated the incident to this particular line of code (made a 1 sheet excel file with just a close button, and it still crashes) I have noted that if the excel file isn't the only one open, sometimes it doesn't crash (maybe the problem is with closing excel itself)
What I have done is separeted the 2 statements so if (when) it crashes it's already saved:
ThisWorkbook.Save
ThisWorkbook.Close
Can anyone shed some lights? I'm really lost. I tried all the alternatives I could think off (activeworkbook...)
Tl;dr: "ThisWorkbook.Close" Causes excel to crash