Unexplained "Automation error Exception occurred" from Excel

Anonymous
2022-07-27T20:20:04+00:00

I'm getting "Automation error Exception occurred" (+ crash) from Excel 2016 for all macros for all workbooks. Started happening some time in the last week (same code worked fine last week)

I created a test case, empty workbook with a single module.


Option Explicit

Option Base 1

Public Sub DoIt()

MsgBox "Done" 

End Sub


If I run it with F5 from inside the VBA editor, it works fine.

If I run it from Developer > Macros > DoIt, error + crash.

I tried doing a "repair" of my office installation, no change.

Thoughts?

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2022-12-01T17:58:33+00:00

    Here's the solution (since my problem hadn't gone away).

    • Open the VBA editor (Alt + F11)
    • Tools > References
    • check-mark "AccessibilityCplAdmin 1.0 Type Library"
    • SAVE
    • (close and reopen Excel)

    I learned this in Stack Overflow and it worked like a charm.

    155 people found this answer helpful.
    0 comments No comments

13 additional answers

Sort by: Most helpful
  1. Vijay A. Verma 104.7K Reputation points Volunteer Moderator
    2022-07-28T04:48:24+00:00

    Check if some update has happened which is creating this issue. This can be checked in Windows updates section.

    0 comments No comments
  2. Anonymous
    2022-07-28T14:34:50+00:00

    Looking at the update history, I see two recent updates: KB5015807 and KB4023057. Not seeing anything there that indicates a known issue.

    Finding today that the issue is more sporadic. My simple test case is still failing, but one of my more complex workbooks is now working (wasn't yesterday)

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2022-10-04T08:12:37+00:00

    Did you ever figure out what the issue was?

    0 comments No comments
  4. Anonymous
    2022-10-04T14:28:54+00:00

    Nope, issue persists. Seems totally random too - some of my sheets show the problem, some don't, doesn't seem to be any rhyme or reason. Only thing that works reliably in running with F5 from the VBA editor.

    Highly annoying.

    2 people found this answer helpful.
    0 comments No comments