Troubleshooting “Object Library Not Registered” after an Office Update

The error “Object Library Not Registered” typically surfaces in Excel right after a Windows or Microsoft 365 update. It occurs when a workbook attempts to initialize a UserForm, run a Visual Basic for Applications (VBA) project, or access an automation library whose underlying Type Library (.tlb, .olb) or ActiveX control registration path was broken, unmapped, or pointed to a removed Office version during the patch process.

Quick Fix

Close all Office programs, press Win + R, type:

regsvr32.exe /u mscomctl.ocx && regsvr32.exe mscomctl.ocx

and press Enter from an elevated command prompt to re-register the common ActiveX control library. If that does not resolve the error immediately, open File Explorer, navigate to %LOCALAPPDATA%\Microsoft\Forms, and delete all cached .exd files (such as MSComctlLib.exd), then restart Excel.


Root Causes of the Error

When Microsoft Office applies a feature update or switches between 32-bit and 64-bit architectures, the Windows Registry updates its TypeLib keys. These keys act as an address book pointing Excel’s VBA runtime engine to interface definitions like Microsoft Forms 2.0, Excel’s own object model, or third-party database objects.

This error typically stems from one of three issues:

  1. Orphaned Version Keys in the Registry: A new update creates keys under a newer version number (e.g., version 1.9), but the old keys (e.g., version 1.8) were not cleanly uninstalled and still point to file paths that no longer exist.
  2. Corrupted Extended Control Files (.exd): When you run a macro containing custom controls, Office builds a binary cache file with an .exd extension. If an Office update changes the underlying library, the cached .exd file conflicts with the new binary definitions.
  3. Broken Windows Common Controls: Standard interfaces—such as progress bars, TreeViews, or ListView controls stored in MSCOMCTL.OCX—fail to update their registration paths within HKEY_CLASSES_ROOT.

Step-by-Step Diagnostic & Repair Path

Work through these steps in order, testing Excel after each step to see if the issue is resolved.

Step 1: Purge the Cached Extended Control (.exd) Files

This is the most common fix when the error appears during the initialization of UserForms or dialogs.

  1. Completely close Excel and all other Office applications (verify via Task Manager that EXCEL.EXE is not running in background processes).
  2. Press Win + R to launch the Run dialog.
  3. Type %TEMP% and press Enter. Select and delete temporary files related to Office (any file with an .exd extension).
  4. Next, press Win + R again, type %LOCALAPPDATA%\Microsoft\Forms, and press Enter.
  5. Delete any file ending in .exd (such as MSComctlLib.exd or RefEdit.exd).
  6. Relaunch Excel and attempt to run the macro. Excel will automatically generate fresh, clean .exd cache files matching your updated Office build.

Step 2: Manually Re-Register Core Type Libraries

If the problem persists, one of the primary interface libraries must be re-registered with the Windows operating system.

  1. Click the Windows Start menu, type cmd, right-click Command Prompt, and select Run as Administrator.
  2. Determine if your Windows installation is 64-bit or 32-bit:
    • For 64-bit Windows running 32-bit Office (the most common source of library breaks), enter: cd C:\Windows\SysWOW64 regsvr32.exe /u mscomctl.ocx regsvr32.exe mscomctl.ocx
    • For 64-bit Windows running native 64-bit Office, enter: cd C:\Windows\System32 regsvr32.exe /u mscomctl.ocx regsvr32.exe mscomctl.ocx
  3. If your workbook relies on the FM20.DLL file (Microsoft Forms 2.0), repeat the command replacing mscomctl.ocx with fm20.dll.
  4. You should see a confirmation dialog stating that DllRegisterServer in [filename] succeeded.

Step 3: Clear Orphaned Typelib Registry Entries

If automated registration fails, the update likely left an orphaned registry key pointing to an older version of the Excel Object Library.

Caution: Modifying registry keys directly can impact system stability. Export a backup of any branch before deleting keys.

  1. Press Win + R, type regedit, and hit Enter.
  2. Navigate to the following key:
    HKEY_CLASSES_ROOT\TypeLib\{00020813-0000-0000-C000-000000000046}(Note: {00020813-0000-0000-C000-000000000046} is the globally unique identifier for the Excel Object Library).
  3. Expand this folder. You will see one or more sub-folders reflecting installed library versions:
    • 1.7 corresponds to Excel 2010
    • 1.8 corresponds to Excel 2013
    • 1.9 corresponds to Excel 2016, 2019, 2021, and Microsoft 365
  4. If you are running Microsoft 365 or Excel 2019, but you see a key for 1.8 or 1.7 alongside 1.9:
    • Right-click the outdated sub-key (e.g., 1.8) and select Export to create a backup file.
    • Right-click the outdated sub-key and select Delete.
  5. Close the Registry Editor, restart your computer, and test Excel.

If you suspect other project references are unmapped or missing inside the VBA editor, consult “User-defined type not defined”: Missing library references (Tools > References) to inspect and repair individual project dependency bindings.


What to Do if the Error Persists

If clearing cache files, re-registering controls, and pruning orphaned registry keys does not resolve the issue, the update experienced a critical failure during write operations (often caused by third-party endpoint protection locking files during the patch cycle).

  1. Open Windows Settings > Apps > Installed Apps.
  2. Locate Microsoft 365 (or your specific Office version).
  3. Click the three dots, select Modify, and choose Online Repair.

Avoid selecting “Quick Repair,” as it only checks for surface-level missing files. An Online Repair replaces the core executable files, rewrites all primary TypeLib entries in the Windows Registry, and restores broken ActiveX associations cleanly.