Automation error Exception occured

Rufus Clupea

Board Regular
Joined
Feb 11, 2019
Messages
85
Hi Folks,

Periodically, when opening & launching my project in Excel, I get an

Automation error
Exception occurred

nastygram, which then closes (crashes) Excel. It doesn't always happen, whether I've changed anything or not. The only way I've noticed that avoids it (after repeated attempts at starting the project) is going into Developer mode, opening the VBE, and then going from there back to Excel and launching the project.

Once I've gone through the aforementioned process, things work normally, and I can continue working on the project until the next time, when this may or may not happen again.

Any ideas/clues on how to fix this? I've looked at the Help Reference, but it's pretty much geek to me... :confused:

TIA
 
Last edited:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
DO you have any start-up macros? Disable all of them (by commenting them out). Then see if you can open normally, consistently. Next uncomment (in a smart way) the macro's bit by bit to see when the error starts again. There is your culprit.

Do you have any 'low level' programming in your macro, like capturing mouse events etc?
 
Upvote 0
DO you have any start-up macros?
No. Excel loads the Workbook fine. The first action to start things going is a simple clicking of a command button.
There are (currently) 2 command buttons; one clears the worksheet—that one works as expected, and doesn't cause the error. The other command button launches a UserForm (sans title bar).

Do you have any 'low level' programming in your macro, like capturing mouse events etc?
There are a couple of Subs that check if the mouse button is down and/or moving, so that the UserForm can be moved around. This allows me to check on the worksheet as different cells are filled with values (the Userform normally fills the entire screen). This doesn't happen until the UserForm is shown; the error occurs when clicking on the command button that causes the UserForm to be shown.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,265
Members
452,627
Latest member
KitkatToby

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