Excel shutdown when a macro is running

Copper Contributor

Hello, I don't understand why but since 3 days my excel file shutdown when I trying to run a macro which running without any problem before. I've seen différents other problems like I can't write a value directly into a cell, or I write it in an other cells and when valid it is enter to the correct cells I've selected or I have to enter the value from the general bar after select the cell I want to write into . It's very strange, I never had these problem before . I've to run my excel file on an other computer ,to start it after restart my computer, but same problems remain. Does anybody can help me ? Thanks .

7 Replies

@DrSph 

There could be several reasons why Excel is shutting down when you try to run a macro.

One possibility is that there is a bug in Excel or that your Excel installation is corrupt. 

Another possibility is that the file itself is corrupted.

You could try testing if the file works on another computer.

If it does, then your Excel installation might be corrupt.

 If it force closes on other computers too, then either Excel has a bug or your file is corrupted.

You could also try using the “Open and Repair” option when opening the file and see if that helps.

 If none of these solutions work, you may need to rebuild the file from scratch.

 

Links with Informations:

Open Office apps in safe mode on a Windows PC

Repair an Office application - support.microsoft.com

How to perform a clean boot in Windows

Here is a link with information on how you can get a quick and precise solution proposal.

Welcome to your Excel discussion space!

 

Thank you for your understanding and patience

 

NikolinoDE

I know I don't know anything (Socrates)

@NikolinoDE 

Thank you very much coming to me with your help. 

Unfortunately, like you suggested me, I' tried the "repair " action, but it doesn't change anything. 

I can add when a simple erase row is tried, nothing done , I close my file and open it just after and this action run normally. That's an other strange action from excel... 

I trying to continue my job with all these problems (changing macro, restart my excel file and so ) but I really don't understand why all these append. I thought it would be a question of update from office 365 to new version...

I don't know what to do, I hope I will succeed to stabilize this situation ...

@DrSph 

Have you performed all Windows and Office updates?

 

Does this problem only appear in a specific file? ...if so, you should see the file and/or which VBA code it is.

 

What extension does the file have? (.xlsx, xls, xlsm, etc.)

 

Did you open Excel in Safe Mode and then the file? ...did it work there?

If yes, disable all AddIns in your Excel and restart excel without Safe Mode to see if the problem has been fixed.

 

If all this has been done and the problem does not only occur with one file, you can actually only uninstall and reinstall the Office package.

But if it only occurs in this file, you would have to look at the file to be able to say something concrete.

It could also be a bug, but I don't have any information on whether it could actually be a buck.

 

At the end, I recommend providing more detailed information about the digital environment. Such as the exact Excel version (this can be called up with the windows command "winver"), operating system, storage medium (OneDrive, Sharepoint, hard disk, etc.), this would help rule out a few things.

 

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. 

 

 

@DrSph 

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.

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.

 

@Earnesto 

@szjohnk 

 

Here is the definition of Click-to-Run server support https://www.techtarget.com/searchenterprisedesktop/definition/Microsoft-Click-To-Run#:~:text=Click%2....

 

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/45dc... - 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!