How to Fix Excel Cannot Insert Object Error for ActiveX Controls

ActiveX controls in Microsoft Excel provide interactive user interface elements such as command buttons, combo boxes, checkboxes, and scroll bars directly on worksheet grids. When attempting to insert an ActiveX control from the Developer tab or when opening an existing workbook containing embedded controls, users frequently encounter the error dialog: “Cannot insert object” or “The programmatic identifier (ProgID) is not registered.” This failure occurs when cached type library files become corrupted by Windows updates, Trust Centre macro security policies block script execution, or 64-bit Office mismatches occur.

Delete Corrupted MSForms.exd Cache Files

When Microsoft releases cumulative security updates for Office, changes to the core FM20.DLL userform library render existing cached control type definitions obsolete. Excel caches these in binary files with an .exd extension. Deleting these files forces Excel to regenerate clean control caches.

  1. Close all open instances of Microsoft Excel, Word, and other Office applications.
  2. Press Windows Key + R, type %temp%\vbe, and press Enter.
  3. Look for any files named MSForms.exd in this folder and delete them.
  4. Press Windows Key + R again, type %appdata%\Microsoft\Forms, and press Enter.
  5. Select and delete all files ending with the .exd extension (including MSForms.exd, RefEdit.exd).
  6. Relaunch Excel and open the Developer tab to verify that ActiveX controls insert without error.

Configure ActiveX Settings in Trust Centre

Enterprise group policies and default Office security hardening configurations frequently disable ActiveX control initialization to prevent malicious macro execution.

  1. Open Microsoft Excel and click File > Options.
  2. In the left pane, click Trust Center, then click the Trust Center Settings button.
  3. Select ActiveX Settings in the sidebar.
  4. Ensure the option “Prompt me before enabling all controls with minimal restrictions” is selected (avoid choosing “Disable all controls without notification”).
  5. Verify that Safe mode is not configured with conflicting restrictive registry flags.
  6. Click OK to apply the changes.

Verify 32-Bit vs 64-Bit Office Architecture Compatibility

Most legacy third-party ActiveX controls (such as older barcode scanners, calendar pickers like MSCAL.OCX, or third-party grid controls) were compiled strictly as 32-bit dynamic link libraries. If you recently upgraded to 64-bit Microsoft Office 365, 64-bit Excel cannot load 32-bit OCX/DLL binaries into its process memory space.

  • In Excel, click File > Account > About Excel.
  • Check the architecture string at the end of the top line (e.g. 64-bit or 32-bit).
  • If you must use legacy 32-bit ActiveX controls that have no 64-bit equivalent, consider replacing them with native Form Controls (found under Developer > Insert > Form Controls) or reinstalling the 32-bit edition of Microsoft 365.

Re-Register System FM20.DLL File

The Forms 2.0 object library provides the foundational interface for all basic ActiveX controls. Re-registering the library repairs broken COM registry pointers.

  1. Click the Start menu, type cmd, right-click Command Prompt, and select Run as administrator.
  2. For 64-bit Windows running 64-bit Office, run:
    regsvr32 C:\Windows\System32\FM20.DLL
  3. For 64-bit Windows running 32-bit Office, run:
    regsvr32 C:\Windows\SysWOW64\FM20.DLL
  4. Verify that the message box reports: “DllRegisterServer in FM20.DLL succeeded.”

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.