This is so frustrating! I have a simple macro in my personal workbook to take filename and path information as parameters and save backup copies using the SaveCopyAs method. I have set up multiple workbooks to call this macro before save. All was working fine until this week, when one of my workbooks decided to arbitrarily start crashing on save. All other workbooks that call this method still work perfectly and the problematic workbook sometimes works as well. Does anyone have any idea what might be the issue?
Observations:
1) It works fine if I open the workbook, make no changes, and save as usual.
2) It works fine if I open the workbook, make changes within the workbook and save as usual.
3) It works fine if I have any other random workbook open when I try to save.
4) The workbook with the issue has a form that opens another workbook. No code on either workbook has been changed since the days when it worked correctly. If I have opened the other workbook using the form, it crashes on save. This happens regardless of if the other workbook is still open at save time or not.
5) The autosave backup method still works almost every time (the macro runs, the confirmation message box pops up at the end, the autosaved file exists where it should) but when it tries to actually save, it crashes.
6) Sometimes is pops up error 1004 and says something like Method does not exist (I can't get it to come up now and I didn't screenshot).
7) In the folder where the original workbook copy should have been saved, the last save version prior to the crash is saved (so the actual save is not working). Also, for each crash, there is a file of file type FILE, 0 bytes, named XXXXX000 where the exes are random numbers/characters.
8) If change the BeforeSave code in the workbook to not call from the personal workbook but recreate the code, it behaves the same (crashes most of the time).
The problem workbook is quite large (>1500 KB) so I'm thinking maybe it has something to do with memory? The only thing that has changed since it was working is the size of the workbook...
If anyone knows why this might be happening I will be very grateful. Thank you.
Bookmarks