4

Access 2010-application using TreeView (MSComctlLib.TreeCtrl.2) shows and populates as expected but suddenly after windows security patches doesn't fire events back to VBA.

Tried with rolling back MSCOMCTL.OCX in /syswow64, but no luck.

Please ping any similar behaviour or hints for fixing the issue.

regards,

Teson
  • 6,644
  • 8
  • 46
  • 69
  • I have Win 7 and Office 2010. I had not yet applied the update and created a test database and test excel sheet, added the treeview control and set some messageboxes for enter and exit. Tested, updated and tested again. It worked on both excel and access. A [similar issue](http://stackoverflow.com/questions/11971358/excel-vba-automation-errors-due-to-office-service-pack-3-0-caused-by-forms/11971632#11971632) came up yesterday and the fix was to re-register the control (not rollback). Have you tried that yet? – ray Aug 16 '12 at 10:34
  • 1
    Take a look at this one: http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_update/security-update-for-mscomctlocx-kb2597986-ms12-060/6dadedda-7bfa-4569-91d8-a31ebcf6a08a?page=1&tm=1345052661855 – HK1 Aug 16 '12 at 15:31
  • @kh1, thanks. Ray023, as mentioned - application was running fine before update. I'll apply patches provided in link and post back. – Teson Aug 16 '12 at 21:56

2 Answers2

3

The problem appears to be that the registry entries for mscomctl.ocx are broken after the security update. One solution can be found in this KB article. It suggests to run this batch file as administrator:

reg delete hkcr\typelib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.0 /f
if exist %systemroot%\SysWOW64\cscript.exe goto 64 
%systemroot%\system32\regsvr32 /u mscomctl.ocx
%systemroot%\system32\regsvr32 mscomctl.ocx
exit
:64 
%systemroot%\sysWOW64\regsvr32 /u mscomctl.ocx
%systemroot%\sysWOW64\regsvr32 mscomctl.ocx
exit

I've verified that this works in our environment.

Andomar
  • 232,371
  • 49
  • 380
  • 404
  • This is also working for Access 2013 (used to do it on Win8/x64 with MSO 32-bit). Further related KB-Articles: [KB2597986](http://support.microsoft.com/kb/2597986) and with a link to download the latest binaries: [KB957924](https://support.microsoft.com/kb/957924) Also found comments on the net, this registry fix helped for hundreds of customers. – metadings May 15 '14 at 13:49
1

I opened an Access file developed on 32-bit Access 2013 running on Windows 7 32-bit, and had experienced this problem when opening it on 64-bit Access 2013 running on Windows 8 64-bit.

My solution:

Delete the control and add it back again, using the design view on your Access form.

Because the treeview's properties are mostly set programmatically, there should be little to do aside from repositioning it and renaming it.

StockB
  • 755
  • 1
  • 13
  • 33