VBA Coding Error︰Pressed "Reset" button and then crashes Excel(Automation error - Exception occured)

smallxyz

Active Member
Joined
Jul 27, 2015
Messages
392
Office Version
  1. 2021
Platform
  1. Windows
Hi all,

My Excel VBE behaves strangely recently.

Whenever I run VBA code in a module and encounter any Error, I will simply press the "RESET" button to re-inspect my code. Recently, after doing so, my Excel will hang for a moment and then prompt an alert window " Automation Error - Exception occured ". After clicking "OK" to continue. the whole Excel just crashes itself.

On the other hand, if the vba code runs smoothly without any error, my Excel just works perfectly as usual.

I have tested upon various sub-routines and notice that such crashing only occurs whenever I commit any coding error which is discovered and yellow-highlighted by VBE(but it shouldn't crash the whole Excel afterwards). I have tried repair & also reinstall the Office but the issue still persists.

Clueless at the moment. Any one knows how to fix it?

Thanks in advance.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
As you should well know by now:

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at:
VBA Error︰Pressed "Reset" button and then crashes Excel(Automation error - Exception occured)

If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,861
Members
449,052
Latest member
Fuddy_Duddy

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