Fix Excel VBA Database Connection Broken After Office Update
Question details
The user needs to restore an Excel VBA database connection that stopped working immediately after updating Microsoft Office to a new build.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Running existing VBA macros to connect to an external database after a recent Microsoft Office update (such as build 17932.20620).
- Observed behavior
- The VBA macro fails to connect to the database, resulting in connection errors or broken references, likely due to altered security settings, bitness changes, or unregistered library files post-update.
Before troubleshooting, write down the exact error code your macro generates and check your Office Account settings to verify if your updated installation is 32-bit or 64-bit.
Check and Repair Missing VBA References
Office updates often displace or upgrade background library files. Fixing missing references in the VBA Editor resolves most macro connection failures.
When Excel updates, the path to database connection libraries (like ActiveX Data Objects) might change. Re-linking these libraries ensures your code can communicate with external databases.
Press Alt + F11 on your keyboard while your Excel workbook is open to launch the Visual Basic for Applications (VBA) Editor.
In the top menu bar of the VBA Editor, click on 'Tools' and select 'References' from the dropdown list.
Scroll through the list of available references and look for any items starting with the word 'MISSING:'. Uncheck the box next to these broken references.
Find the updated version of the missing library further down the list (for example, Microsoft ActiveX Data Objects 6.1 Library), check its box, and click 'OK'.

Verify Database Driver Bitness and Trust Settings
Use this solution if your VBA references are correct but the database driver is failing to connect due to mismatched architecture or strict macro security.
Perform a Quick or Online Repair of Microsoft Office
If registry keys related to VBA or database drivers were corrupted during the update, repairing the Office installation can restore default functionalities.
Try WPS Office for Stable VBA and Macro Performance
If automatic Microsoft Office updates frequently disrupt your workflow, break your VBA macros, or corrupt database connections, consider switching to WPS Office. It provides robust compatibility with Excel macros (.xlsm) in a lightweight, user-friendly environment without forcing disruptive updates.
- 1. Download and Install WPS Office: Visit the official WPS website, download the free installer, and complete the lightweight installation.
- 2. Open Your Macro File: Launch WPS Spreadsheets and open your existing .xlsm file. Your formatting and formulas will remain intact.
- 3. Enable Macros: Click the security warning at the top of the worksheet to enable macros and seamlessly resume your database operations.

Frequently Asked Questions
Why did my Excel VBA macros stop working after an Office update?
Office updates can occasionally alter default security settings, update core library file paths (causing 'MISSING' references in VBA), or change the application's architecture (bitness), which disconnects previously working database drivers.
How do I know if my Office update changed to 64-bit?
Open Excel, navigate to File > Account, and click the 'About Excel' button. The very top line of the resulting dialog box will state whether your current installation is 32-bit or 64-bit.
Can I roll back a Microsoft Office update to fix my macro?
Yes, you can revert to a previous Office build using the Office Deployment Tool or by executing a specific command in the Command Prompt to target an older version number. However, fixing the missing references is highly recommended as a safer long-term solution.
Do I need special drivers to connect Excel VBA to SQL Server or Access?
Yes, your operating system must have the correct ODBC Driver or OLE DB provider installed. Crucially, the bitness of this driver (32-bit or 64-bit) must perfectly match the bitness of your Excel application, regardless of your Windows OS bitness.




