By Mike Pedersen


2014-12-10 21:44:09 8 Comments

I have some Excel worksheets that use ActiveX checkboxes to control certain activity. They worked recently but today started to give errors. I was alerted to this by a colleague, but it was still working on my computer. I checked his version of Excel against mine and his was newer. I noticed there were new Windows updates, so I did the update. After I applied pending updates, it now no longer works on my computer. I cannot check the ActiveX checkboxes any longer, and, as a part of trying to debug, it appears I cannot even add an ActiveX control to any worksheet, even a new worksheet, any more. I get an error dialog that says, "Cannot insert object." (I can still add form controls, just not ActiveX.) Anyone else experiencing this after a recent update? Any suggestions?

Thanks,

Mike

11 comments

@Spurious 2017-05-30 13:52:14

I want to provide an answer that worked as the only thing for me (I realize that I might be the only one ever). I had in one macro that I was calling using the ribbon. It had the following code:

colStore = new Collection

I wasn't aware that it throws an error so I was baffled and tried everything in here. The button just stopped working and I couldn't get it to work. When I noticed the error and corrected it to:

Set colStore = new Collection

It started working again. Absolutely strange if you ask me but maybe it helps someone out there who was as desperate as me.

@dePatinkin 2015-04-26 07:06:26

The best source of information and updates on this issue I could find is in the TechNet Blogs » The Microsoft Excel Support Team Blog (as mentioned):

Form Controls stop working after December 2014 Updates (Updated March 10, 2015)

On March 2015 a hotfix was released in addition to the automated fix-it and manual instructions, and it's available on Windows Update as well.

The latest update and fix from Microsoft: 3025036 "Cannot insert object" error in an ActiveX custom Office solution after you install the MS14-082 security update

STATUS: Update March 10, 2015:

Hotfixes for this issue have been released in the March 2015 Updates for Office 2007, 2010 & 2013.

General info about the problem:

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.

https://technet.microsoft.com/en-us/library/security/ms14-082.aspx

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." [...] 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.

Manual and additional solutions:

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

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 > 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.

@chaltahai 2015-01-28 13:09:15

I know many answers have already been posted for this, but neither one answer independently worked for my site. So here is what worked for me:

Step 1: Uninstall the following updates - KB2920789, KB2920790, KB2920792, KB2920793, KB2984942, KB2596927

Step 2: Hide these updates so they do not get installed on subsequent reboots

Step 3: Delete folder Excel8.0 from C:\Users\<>\AppData\Local\Temp

Step 4: Restart workstatiion (I would also make sure the above mentioned KBs did not inadvertently get applied)

@pghcpa 2014-12-16 22:22:08

Advice in KB and above didn't work for me. I discovered that if one Excel 2007 user (with or without the security update; not sure of exact circumstances that cause this) saves the file, the original error returns.

I discovered that the fastest way to repair the file again is to delete all the VBA code. Save. Then replace the VBA code (copy/paste). Save. Before attempting this, I delete the .EXD files first, because otherwise I get an error on open.

In my case, I cannot upgrade/update all users of my Excel file in various locations. Since the problem comes back after some users save the Excel file, I am going to have to replace the ActiveX control with something else.

@DontFretBrett 2015-01-20 22:51:53

None of the suggestions worked for me except saving the file as an XLSX (removing all code), then re-pasting as you did - resaving as XLSM. Huge, MASSIVE pain in the ass Microsoft. Reinstalling office didn't fix it for me either so nobody waste your time trying that

@perry 2015-01-06 23:40:38

Simplified instructions for end-users. Feel free to copy/paste the following.

Here’s how to fix the problem when it comes up:

  1. Close all your Office programs and files.
  2. Open Windows Explorer and type %TEMP% into the address bar, then press Enter. This will take you into the system temporary folder.
  3. Locate and delete the following folders: Excel8.0, VBE, Word8.0
  4. Now try to use your file again, it shouldn't have any problems.

You might need to wait until the problem occurs in order for this fix to work. Applying it prematurely (before the Windows Update gets installed on your system) won't help.

@Jan Moritz 2014-12-12 22:50:28

Here is the best answer that I have found on the Microsoft Excel Support Team Blog

For some users, Forms Controls (FM20.dll) are no longer working as expected after installing December 2014 updates. 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 received errors such as:

"Cannot insert object" "Object library invalid or contains references to object definitions that could not be found"

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. Steps to follow after the update:

To resolve this issue, you must delete the cached versions of the control type libraries (extender files) on the client computer. To do this, you must search 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%\VBE

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 %appdata%\Roaming\microsoft\forms\*.exd

del %temp%\word8.0\*.exd

del %temp%\PPT11.0\*.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.

    Open Visual Basic for Applications > modify the project by adding a comment or edit of some kind to any code module > Debug > Compile VBAProject.

    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.

If this does not resolve your issue, it may be a different issue and further troubleshooting may be necessary.

Microsoft is currently working on this issue. Watch the blog for updates.

Source

@peterson 2014-12-15 14:55:40

check the linked Source, it has now updated Scripting solution

@pstraton 2016-09-23 19:38:25

On my machine, %appdata% is defined as "C:\Users\<current user>\AppData\Roaming\", so there is no "%appdata%\microsoft\local\" directory. Also, "%appdata%\Roaming\microsoft\forms\" appears to be redundant, as "C:\Users\<current user>\AppData\Roaming\Roaming\microsoft\forms\" and, again, no such directory exists on my machine.

@Marc Thibault 2014-12-30 01:31:33

With Windows 8.1 I couldn't find any .exd files using windows search. On the other hand, a cmd command dir *.exd /S found the one file on my system.

@Mike Pedersen 2014-12-18 14:08:29

I did finally find this answer on the official Microsoft KB:

http://support.microsoft.com/kb/3025036/EN-US

No new information here than what we have in previous answers, but at least it acknowledges that Microsoft is aware of the issue.

@Yi Hu 2014-12-16 00:18:58

I'm an Excel developer, and I definitely felt the pain when this happened. Fortunately, I was able to find a workaround by renaming the MSForms.exd files in VBA even when Excel is running, which also can fix the issue. Excel developers who need to distribute their spreadsheets can add the following VBA code to their spreadsheets to make them immune to the MS update.

Place this code in any module.

Public Sub RenameMSFormsFiles() 
  Const tempFileName As String = "MSForms - Copy.exd"  
  Const msFormsFileName As String = "MSForms.exd"  
  On Error Resume Next 

  'Try to rename the C:\Users\[user.name]\AppData\Local\Temp\Excel8.0\MSForms.exd file  
  RenameFile Environ("TEMP") & "\Excel8.0\" & msFormsFileName, Environ("TEMP") & "\Excel8.0\" & tempFileName 
  'Try to rename the C:\Users\[user.name]\AppData\Local\Temp\VBE\MSForms.exd file  
  RenameFile Environ("TEMP") & "\VBE\" & msFormsFileName, Environ("TEMP") & "\VBE\" & tempFileName 
End Sub  

Private Sub RenameFile(fromFilePath As String, toFilePath As String) 
  If CheckFileExist(fromFilePath) Then 
      DeleteFile toFilePath  
      Name fromFilePath As toFilePath  
  End If  
End Sub

Private Function CheckFileExist(path As String) As Boolean 
  CheckFileExist = (Dir(path) <> "")  
End Function  

Private Sub DeleteFile(path As String) 
  If CheckFileExist(path) Then 
      SetAttr path, vbNormal  
      Kill path  
  End If  
End Sub    

The RenameMSFormsFiles subroutine tries to rename the MSForms.exd files in the C:\Users\[user.name]\AppData\Local\Temp\Excel8.0\ and C:\Users\[user.name]\AppData\Local\Temp\VBE\ folders to MSForms - Copy.exd.

Then call the RenameMSFormsFiles subroutine at the very beginning of the Workbook_Open event.

Private Sub Workbook_Open() 
  RenameMSFormsFiles  
End Sub

The spreadsheet will try to rename the MSForms.exd files when it opens. Obviously, this is not a perfect fix:

  1. The affected user will still experience the ActiveX control errors when running the VBA code the very first time opening the spreadsheet. Only after executing the VBA code once and restarting Excel, the issue is fixed. Normally when a user encounters a broken spreadsheet, the knee-jerk reaction is to close Excel and try to open the spreadsheet again. :)
  2. The MSForms.exd files are renamed every time the spreadsheet opens, even when there's no issue with the MSForms.exd files. But the spreadsheet will work just fine.

At least for now, Excel developers can continue to distribute their work with this workaround until Microsoft releases a fix.

I've posted this solution here.

@J. Chomel 2016-07-25 07:51:43

Thanks Yi. It worked for me but I had to restart my Excel 2010 (it could be linked with the fact that I was running VBA editor at the same time?)

@Ron R 2014-12-11 01:41:47

It was KB2553154. Microsoft needs to release a fix. As a developer of Excel applications we can't go to all our clients computers and delete files off them. We are getting blamed for something Microsoft caused.

@Harry Johnston 2014-12-18 21:48:32

Also KB2596927 and KB2726958, depending on the version of Office you're running.

@John W. 2014-12-10 23:26:50

From other forums, I have learned that it is due to the MS Update and that a good fix is to simply delete the file MSForms.exd from any Temp subfolder in the user's profile. For instance:

C:\Users\[user.name]\AppData\Local\Temp\Excel8.0\MSForms.exd

C:\Users\[user.name]\AppData\Local\Temp\VBE\MSForms.exd

C:\Users\[user.name]\AppData\Local\Temp\Word8.0\MSForms.exd

Of course the application (Excel, Word...) must be closed in order to delete this file.

@Mitchell Kaplan 2014-12-11 02:43:12

I had an un-updated PC. I opened Excel, and was able to add an ActiveX button. I looked for C:\Users[user.name]\AppData\Local\Temp\Excel8.0\MSForms.‌​exd, but there was no Excel8.0 folder. I then ran Windows update. I tried again to add an ActiveX button to my spreadsheet and could not. I also noted that I now had that Excel8.0\MSForms.exd. I deleted it and without rebooting re-opened Excel and was now able to add the ActiveX button. Thanks!

@Mike Pedersen 2014-12-11 03:43:20

Thank you!! This process fixed the issue on my computer. I feel for developers who have large public releases that this breaks... Hopefully MS will issue a fix.

@blarg 2014-12-11 15:52:00

Thank you! Wasted a whole morning because of this.

@mountainclimber 2014-12-11 18:48:44

This did not work for me. I am doing a system restore back to 12/7/14 on one of our pcs to see if that will fix it. I also tried removing a button and replacing it per an answer below, but I received a pop up "Can't insert Object" or something like that.

@John W. 2014-12-11 21:32:18

Sorry about that. Did you find one or more MSForms.exd files? Were you able to delete all that were found?

@bjtilley 2014-12-16 19:44:57

For Windows XP users Temp subfolder can be found here: C:\Documents and Settings\[user.name]\Local Settings\Temp\Excel8.0\MSForms.exd

@QV1 2015-01-06 10:15:31

After deleting the above files, it didnt work for me, but then I found these files in the C:/Windows/Temp folder, and deleted those. Then I was able to get this issue working.

@Diego Farina 2015-01-08 15:19:56

Very good, thank's

@user1641172 2015-01-08 15:39:06

In windows 8, I found these in C:\Temp (%TEMP%)

@DontFretBrett 2015-01-13 21:31:04

WTF? Fixed it for me. Thank you

@Jeff Olson 2015-03-18 20:13:18

you are a genius, sir!

@KiwiSteve 2015-12-13 20:43:10

I recently had this problem, and fixed it by deleting ALL .exd files on my PC. Just did a search and deleted the ones I found. Worked first time, now I can use AX controls as before.

@Santosh 2016-01-29 10:39:59

It worked for me in local environment but when I open the same file via Citrix the buttons are not working. I have restricted access in citrix, so I cant access the temp folder. Any suggestion?

@John W. 2016-01-29 17:52:50

Santosh - Sorry, other than having access to the temp drive on the target machine, I don't know how to resolve this issue. This is why I can't understand why MS does not have a better fix. We as developers cannot be expected to physically access every users machine around the world. EDIT - after reading this site, it appears that MS has a HotFix to correct this issue blogs.technet.com/b/the_microsoft_excel_support_team_blog/…

Related Questions

Sponsored Content

7 Answered Questions

[SOLVED] How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops

  • 2014-03-20 19:09:13
  • Portland Runner
  • 732465 View
  • 496 Score
  • 7 Answer
  • Tags:   regex excel vba

42 Answered Questions

[SOLVED] How to create Excel (.XLS and .XLSX) file in C# without installing Ms Office?

  • 2008-09-29 22:30:28
  • mistrmark
  • 998101 View
  • 1732 Score
  • 42 Answer
  • Tags:   c# .net excel file-io

4 Answered Questions

1 Answered Questions

[SOLVED] Excel activex check box to enable or disable printing

  • 2016-01-20 16:29:45
  • donald kuda
  • 436 View
  • -1 Score
  • 1 Answer
  • Tags:   excel excel-vba vba

4 Answered Questions

1 Answered Questions

Excel 2010 - ActiveX controls

2 Answered Questions

[SOLVED] using activex checkbox control in spreadsheet

1 Answered Questions

[SOLVED] Excel ActiveX Button is clickable, but does not work

3 Answered Questions

Sponsored Content