VBA compile error: variable not defined in Excel after Office updates to v2212. What's going on?

Anonymous
2023-01-14T17:51:07+00:00

I have a number of users, myself included, who are getting the variable not defined error when opening files with macros that have worked for years. The common element in all these cases is that Office had updated to v2212. Users with v2211 work fine. Excel often becomes unstable after OKing out of the errors. In addition, I've had a number of people with the same problem respond to a discussion forum post I created a couple days ago. Again, the common element is v2212. If someone could please elevate this situation or provide some additional insight, that would be great. It seems to be affecting a lot of users with VBA code in their files.

Microsoft 365 and Office | Excel | Other | 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

26 answers

Sort by: Most helpful
  1. Anonymous
    2023-01-20T21:12:15+00:00

    @Tony,

    Thanks for all the information. At this point, I don't think there's a reliable solution. I've done the VBA cleaning that I discussed in previous posts and had some success. I've distributed updated files to about 30 users so far and it has worked for all but four. However, I've had two users contact me today where it worked initially but stopped working after a couple days.

    Rolling back to the 2211 update is the only realistic solution. I've had a lot of success having users check the "Disable Trusted Documents" checkbox in Excel's Trust Center Settngs, which forces the user to click the Eanble Content button each time. Anything that will allow the file to open completely before VBA code starts running. That seems to work unless the user has the Excel vba window open, then they get the error. I can't really explain why that would be the case and I'm not sure if that would work for your files.

    It's getting really annoying as I have hundreds of users and every day more of them get the Office update and have the problem. I just wish Microsoft would pause the roll out. I'm tired of spending my days trying to find workarounds for their bad release. I hope someone in Redmond is at least paying attention.

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-01-20T23:01:27+00:00

    We have a call with MS on Monday regarding the same issue with Excel and VBA. From what I understand MS is readying a fix for the next Office update in February.

    0 comments No comments
  3. Anonymous
    2023-01-20T23:08:09+00:00

    That's great news!

    0 comments No comments
  4. Anonymous
    2023-01-21T04:22:09+00:00

    @davidr505,

    Thanks so much for the information. I was hoping we would hear something along those lines.

    0 comments No comments
  5. Günter Born 49,446 Reputation points Volunteer Moderator
    2023-01-23T06:39:43+00:00

    We have a call with MS on Monday regarding the same issue with Excel and VBA. From what I understand MS is readying a fix for the next Office update in February.

    FYI: I've also a report from a German user - see my blog post:

    Office trouble: Excel calculation issues, and Outlook starts in safe mode (January 2023)

    0 comments No comments