Forum Discussion
Excel shutdown when a macro is running
Hello all. I experienced the same problem when working Excel with VBA. Excel shuts down when I tried running a VBA. I checked that the Visual Basic Editer cannot shows the codes and the code window gone. After reworking for many times, I realised that it happened during I worked under VPN. I have to reboot the PC and make a new workbook to eliminate the problem. Once a workbook is crushed when running VBA, we cannot update it to recover from randomly shut down problem. We have to build a new workbook and input all data and VBA once again from the beginning.
You are in the time frame that I am with these kinds of issues you described. I found I had an update that caused unable to see code, missing library components, errors on code that has run for ever. Turned out the Click-to-run servers were not pushing the complete update. While the MSI servers were. I fixed my office with an Office Pro Plus 2019.IMG download to my backup drive until they get the updates sorted out on the servers. Then I was finding I was having the working environment changed with edge WebView2 after having some more serious corruption. My first response now has become if excel crashes running macros or wants me to run a repair or crashes on open or crashes on opening a different macro file is not to run office repair. I resort to my backup reinstall. I found running my daily macro analysis and reports with the internet turned off things were fine again. So, took the process off my workstation and put it in a laptop, which is running now while I write this. I am 10 days behind and I have set up a catch up on all the data downloads I did while trying to sort all this out. I turn on the internet in that PC to do data collection and turn off internet till next download. I have office updates off on my workstation now until things settle down. The library Common Controls 2 for 64bit was what was missing on the Click-to-run update. I really had a hard time today moving the required files to the LapTop on my LAN because of security issues I was running into and never seen before. Crashed google drive (my cloud LAN backup) by passed that with a flash drive. Got the laptop running to catch-up. Sorted out Google Drive. I think these new changes will keep us going for a while. If having the internet off makes a difference, then something is interfering with my apps success rate probability (Excel?, VBA?, CPU?, Memory?, Data Transfer? or ???? work being done environment variables! I have 4K machine with small monitors.
- szjohnkDec 23, 2023Copper Contributor
Hi Earnesto,
Thank you for your sharing in overcoming tha excel shutdown prpblem.
In these days, it happens frequently and forced me to removed the MS365 completely from my PC. I installed it all from the beginning and hope that it helps a lot.
I will try to work with excel in a Notebook which is not connecting to the internet. Data will be got with another PC and input manually to the workbook in the Notebook. I will keep you updated to see it works or not.
- EarnestoDec 23, 2023Copper Contributor
Here is the definition of Click-to-Run server support https://www.techtarget.com/searchenterprisedesktop/definition/Microsoft-Click-To-Run#:~:text=Click%2Dto%2DRun%20is%20a,used%20on%20an%20endpoint%20computer.
If you follow the instructions you can see if your software is Click-to-Run supported or MSI.
If you are Click-to-Run, I would think the most important thing to do is be sure your download source for Installs, Online Repairs and Updates is giving you the complete package with the same software components of the MSI servers.
This explanation also scares me a little because you could be getting additional updates while you are running macros and the complaints I'm see about what is people are doing and what happen when issues occur.
Here is a link about the recent delivery issue presented with Click-to-Run, but this only effects 64bit machines running in 64bit VBA mode is my understanding at this time. I am running VBA in 64bit.
"https://answers.microsoft.com/en-us/msoffice/forum/all/click-to-run-deployment-does-not-include/45dc8801-644c-4bcf-8852-51a73f646033%22 - Ops looks like the thread is no longer available!
mode.
I have my data collection happening daily from a web site to keep ahead of the catchup process (no issues there, but network is open only for a little while and my browser it Google Chrome).
By starting a new process as soon as the macros for one day are done. I am on12/19/23 now. The laptop goes to sleep if I am not there when it is done to start another cycle..
I have run only 6 cycles because of work around setup issues with files moved between PCs connected with Google Drive files and folders to the laptops' Drive from my workstation (was the older faster easy way to do it -I'll have to sort that out latter, looks like security changes or something of that sort).
The first process creates an "a" version backup as soon as the data is imported into about 40 worksheets to update the graphs and spread sheets (has 3 sub processes). There are 7 sub processes total.
The 7th stops on a code point break because of damage that occurred there when previously good code stopped working and I tried to fix it before I realized what was going on. That will be work-in-progress when I get caught up.
The laptop, Excel, and VBA are stable and running continuously except when I am not there at the end of a cycle.
If you replay I get and e-mail.
Good Luck with you test environment!