Annoying Problem With VBA Editor Crashing Excel

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,564
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I am working on an Excel VBA project and have recently started encountering a very annoying problem.
When I am testing my project, if I run into an error, or I stop to step through and make changes based on the results encountered while stepping through, and attempt to save these changes or corrections, Excel crashes. No error messages, it just folds up and restarts the project as if nothing happened. It's the original file, not a backed up one that is started, and the changes made are not reflected. (Assuming the save was unsuccessful).

If I don't execute my code in my project, and just go straight to making known changes or corrections and save, I'm fine. It's only after my code has been executed.

I know it's a crap shoot, but is there any way I can determine what is causing this crash?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Start directly in Step-By-Step debug mode in order to see which is the codeline raising the crash …​
And obviously you must stop first the execution before saving the workbook …​
 
Upvote 0
Thanks Marc L.
I am in step-by-step prior to when I try to save (which crashes). I step through, make the correction or change, and try to save from the editor save button. Whether I stop first or not, it behaves the same. Whether I try to save from the VBA editor of Excel proper, I get the same behaviour. I get no error messages while stepping through, or as it (attempts to) save. It just shuts down and restarts fresh. It was almost like it was saving (but it isn't ... no changes appear to have been saved), closing and then restarting (without the changes).

Perhaps a computer restart ...
 
Upvote 0
Yes obviously a computer restart may help as Excel not well manages the memory …​
And in such case the better is to save the workbook if necessary before to launch any VBA procedure​
 
Upvote 0
Unfortunately that didn't do it. I've tried a Office Quick Repair. We'll see if that does the trick.
 
Upvote 0
Maybe clean the Windows Temp folder, the Temp folder of the Windows session and the Office cache folder …​
 
Upvote 0
Nope ... that didn't do it either. Must be something in my code, and likely with a form that was in use prior to the save attempt. Only crashes after having accessed the form.
 
Last edited:
Upvote 0
Hoping the workbook does not use some ActiveX control …​
 
Upvote 0
The better !​
Maybe the workbook is damaged, try on another one in a similar situation …​
 
Upvote 0

Forum statistics

Threads
1,214,647
Messages
6,120,722
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top