“Cannot insert object” error in an ActiveX and VBA error


To totally unlock this section you need to Log-in


Login

For some users, Form Controls (FM20.dll) are no longer working as expected after installing MS14-082 Microsoft Office Security Updates for December 2014.

Issues are experienced at times such as when they open files with existing VBA projects using forms controls, try to insert a forms control in to a new worksheet or run third party software that may use these components.

You may receive errors such as:

"Cannot insert object"

"Object library invalid or contains references to object definitions that could not be found"
"The program used to create this object is Forms. That program is either not installed on your computer or it is not responding. To edit this object, install Forms or ensure that any dialog boxes in Forms are closed."

Note In this last error message, the Forms text may also be replaced by the GUID of the control.

Additionally, you may be unable to use or change properties of an ActiveX control on a worksheet or receive an error when trying to refer to an ActiveX control as a member of a worksheet via code.

Solution

After updating, the cached control type libraries (extender files) may be out of sync. To resolve this issue, you must delete the cached versions of the control type libraries (extender files) on the client computer.

To do this, perform a search on your hard disk for files that have the ".exd" file name extension and delete all the .exd files that you find. These .exd files will be re-created automatically when you use the new controls the next time that you use VBA.

These extender files will be under the user's profile and may also be in other locations, such as the following:

%appdata%\microsoft\forms

%temp%\excel8.0
%temp%\word8.0
%temp%\PPT11.0
%temp%\vbe

Notes:

  • Ensure that your file extensions are viewable prior to performing the search.
  • Close all Microsoft Office applications prior to deleting the files.

[tweet]

If the search above does not find any .exd files and the issue persists:

  • In Windows Explorer, open the %TEMP% folder, search for "MSForms.exd" in all subfolders and delete all instances of that file that are found (including those in the subfolders).
  • Do the same for the %APPDATA% folder and subfolders.

Scripting solution

Because this problem may affect more than one machine, it is also possible to create a scripting solution to delete the EXD files and run the script as part of the logon process using a policy. The script you would need should contain the following lines and would need to be run for each USER as the .exd files are USER specific.

del %temp%\vbe\*.exd

del %temp%\excel8.0\*.exd
del %appdata%\microsoft\forms\*.exd
del %appdata%\microsoft\local\*.exd
del %temp%\word8.0\*.exd
del %temp%\PPT11.0\*.exd

In alternative, you could use a .bat or .cmd simple script to search in the whole system volume (C:\ tipically) and delete all the exd files eventually present on your system.

cd C:\

del /S /A:H /A:-H *.EXD

To search only exd files on system, replace del /S /A:H /A:-H *.EXD with dir/S /A:H /A:-H *.EXD.

Additional step

If the steps above do not resolve your issue, another step that can be tested (see warning below):

  1. On a fully updated machine and after removing the .exd files, open the file in Excel with edit permissions.
  2. Open Visual Basic for Applications Editor > modify the project by adding a comment or edit of some kind to any code module > Debug > Compile VBAProject.
  3. Save and reopen the file. Test for resolution.

If resolved, provide this updated project to additional users.

Warning: If this step resolves your issue, be aware that after deploying this updated project to the other users, these users will also need to have the updates applied on their systems and .exd files removed as well.

Using the Microsoft Fix-IT for All Users

If you don't want to manage directly the exd files you could use the Microsoft Fix-IT, available from http://go.microsoft.com/?linkid=9875111, to automate the exd cleaning process. This tool will be always availble from HeelpBook site, too (at the bottom of this article). :-)

Download

You can download the Microsoft Fix-IT 9875111 directly from HeelpBook, but first you will need to register and be logged on HeelpBook. Be calm, it's totally free. :-)

[wpfilebase tag="file" id=190 /]

1 thought on ““Cannot insert object” error in an ActiveX and VBA error”

Comments are closed.