Dutch Gemini's Weblog Pages

August 22, 2012

VBA Add-Ins stop working after installing Security Patch MS12-060

Filed under: Excel,VBA,Windows — dutchgemini @ 11:34 am
Tags: , , , , , , ,

Last Wednesday August 15, Security Patch MS12-060 from Microsoft hit the community and created quite some panic, because all of a sudden Add-Ins developed in VBA for Excel as well as for other Office applications stopped working. Depending on the Add-In you could either get error messages, crippled command bars or ribbons, or no warning at all.

In this patch, Microsoft replaced the ActiveX Windows Common Controls file MSCOMCTL.OCX with a more secure version. The same file has caused trouble earlier this year (April, 10).

Luckily, it appears that the problems are being caused by a faulty registration of this file into the Registry and that re-registering this file makes them disappear. This is a copy from TechNet. Mind that you must register the file as an Administrator otherwise the registration will fail.

The fix for this problem is to re-register MSCOMCTL.OCX. To do this, follow these steps:

  1. Open an administrative-level command prompt. Click START, and type RUN in the run command line. On Windows Vista and Windows 7 you will see CMD.EXE appear in the quick search list. Right click CMD.EXE and left click Run As Administrator. A black command prompt opens.
  2. If on a 64-bit machine, type the following:

regsvr32.exe /u  C:\Windows\SysWOW64\MSCOMCTL.OCX

Press ENTER, then type

regsvr32.exe  C:\Windows\SysWOW64\MSCOMCTL.OCX

If on a 32-bit machine, type the following:

regsvr32.exe /u C:\Windows\System32\MSCOMCTL.OCX

Press ENTER, then type

regsvr32.exe C:\Windows\System32\MSCOMCTL.OCX

Each time you press ENTER you will see a small informative message. This is normal. The first ENTER unregisters the file, the second registers the file.

According to this same link, you may also need to remove a key in the registry (I did not add it because for me this was not necessary). You may have to repeat the above actions.

I also re-registered MSCOMCT2.OCX, although not mentioned in the article, but only after I did my VBA running Office 2007 on W7 resumed full operation.

Your Office program should work again after doing this.

Dutch

4 Comments »

  1. Thanks a lot Dutch. I followed your instructions and it works fine now. You saved me a lot of time.

    Comment by Benito — October 17, 2012 @ 12:35 pm | Reply

  2. […] Update: if you are having problems after installing Security Patch MS12-060 then click here. […]

    Pingback by Excel (VBA) error: Could not load an object because it is not available on this machine « Dutch Gemini's Weblog Pages — October 18, 2012 @ 11:59 am | Reply

  3. Hi Dutch, thank you very much for this post. It worked for me. It solved my excel issue that I had after office 2007 update in april (“Receiving Compile error in hidden module: GlobalMacro “).

    Comment by Silvio Fuchs — October 25, 2012 @ 10:22 am | Reply

  4. […] when looking at in the VBA IDE the date time pickers are missing. I read a couple of articles: VBA Add-Ins stop working after installing Security Patch MS12-060 | Dutch Gemini's Weblog Pages and tinkered with the unregistering and re-registering the MSCTCOM2.OCX, but that does not solve […]

    Pingback by Sudden issues with DT Picker 6.0 in a form — April 25, 2013 @ 12:26 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a reply to Sudden issues with DT Picker 6.0 in a form Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a free website or blog at WordPress.com.