Forum Discussion
Excel Macros disappear from xlsm file
Thanks Peter for raising this issue. I have exactly the same issue in the past few days. This happened to xlsm and xlsb file with VBA. I am wondering if you have found solutions to this. This issue is really annoying. Thanks for sharing
no, final answer yet. But I have realized that one of our xlsm files (our timesheet file, which is running on each computer) is generating this problem most frequently (this file is started by the task scheduler on hourly basis). In this file we hade a macro which was running automatically when the file has been opened. I have cut out this macro and since then we have experienced this problem less. But there was no science behind this step and it is absolutely possible that there is no link at all and it was just pure luck.
Cheers
Peter
- KCU_123Dec 19, 2023Copper ContributorThank you Peter for your updating and sharing your findings. This problem is really frustrating and really a headahe for me. 6 out of 10 items I run my reports and they crash and I cannot save the files and all my macros are missing. I hope microsoft can produce a quick solution to this. Kind regards, Kebin
- JoaoBJDec 20, 2023Copper Contributor
I have been experiencing something akin to that.
Several of my xlsm files have lost their connection to its macros or, worse, loose all their macros like if it was not a xlsm file.
One day the macros run without a glitch, and I save them. The next day, I open the file and when I press alt+F8, there are no macros to be executed. Or if I press the keys associated to run a macro, nothing happens. Then, when I press alt+F11, one of to things happen: there are no modules anywhere to be found or, if there are any, when I go to one of them and press F5, I get an error message:The first time this happened I thought that it was one of those pesky things that happens from time to time with Excel and safe mode, and just got a backup file and restarted. The second time around, I did the same thing. The both times that this happened it was with large Excel files and I thought that may be it was related to their size. Today it happened with a pretty small file so it is not size related. And this started happening after an office update. So, it probably is a new error that needs to be addressed.
- NicolasTldDec 20, 2023Copper Contributor
Hi,
I have no solution to give you but I can guarantee that this issue is not a new one. I'm facing it with all kind of file's size since at least 2019 (I've tried hard to find any related characteristics between corrupted workbooks but sadly there's not).