RMIM Designer (Visio) OCX Errors
Dealing With Microsoft VBA Error "Compile error: Automation error"
A Google search will reveal that there have been numerous reports of VBA solutions (in Excel, Access, Visio, Word) failing owing to an erroneous registry change made for "common controls" as part of a mid-2012 security patch from Microsoft. In the HL7 Community, this was reported by three different users, and was recently seen (as documented below) by one of the Toolsmiths. All of these reports included concerns that the problem arose on 64-but Windows systems, although the scenario below suggests this is an unproven cause-effect relationship. (Having said that, there are no reports within HL7 of this occurring on 32-bit windows installations, including the author's.)
The image at left shows the error message seen in step 9 of the scenario shown below. The following two sections trace the "discovery" of this problem and a means of repair.
Discovery Scenario
This afternoon, I was trying to verify that we can run a 32-bit Visio 2007 alongside a 64-bit Office 2010 under 64-bit Windows. The steps were:
- Uninstall my 32-bit Office 2010, including 32-bit Visio 2010
- Was working in a "virtual machine" with a Windows 7, 64-bit operating system that had been installed two weeks ago, and that had a complete set of updates applied.
- Installed 64-bit Microsoft Office 2010 to provide Word, Excel, Access, and PowerPoint software.
- Allowed all Office 2010 updates to be applied (there were over 30 of them).
- Installed 32-bit Visio 2007 to be the foundation for my RMIM Designer. (Note that the HL7 RMIM Designer can not be run in 64-bit Office thanks to Microsoft having dropped support for previously "common" controls that MS provided.)
- Installed RoseTree, the HL7 RMIM Designer Installer and then the HL7 RMIM Designer in Visio.
- Tested the RMIM Designer solution and it worked correctly.
- Left machine idling for about an hour. When I returned to it, discovered that it wanted to install 10 security updates for Office 2007. I allowed it to do this installation.
- Again tested the RMIM Designer and it failed with an error message box from Microsoft Visual Basic that said "Compile error: Automation error"
- Made no changes to any software, but rather cleaned up my system and reinstalled as follows:
- used the Control Panel to uninstall the HL7 RMIM Designer Installer
- used the Control Panel to uninstall RoseTree
- deleted the contents of directory <<username>>/MyDocuments/MyShapes/HL7
- rebooted the system (although this may not be necessary)
- used the Control Panel to uninstall the HL7 RMIM Designer Installer
- Re-installed as:
- installed RoseTree
- installed the HL7 RMIM Designer Installer
- ran the HL7 RMIM Designer Installer in order to place the Visio software for the RMIM Designer in <<username>>/MyDocuments/MyShapes/HL7
- installed RoseTree
- Tested the RMIM Designer and found no errors.
There have been numerous reports of VBA solutions (in Excel, Access, Visio, Word) failing owing to an erroneous registry change made for "common controls" as part of a mid-2012 security patch from Microsoft. My inference from the scenario above is that everything was fine after I had installed the operating system (with all updates), the other (2010) Office software with its updates, and the Visio 2007 installation before updates. At the time the Office 2007 security updates were applied, the registry error appeared and caused the error messages seen in step 9. The process of uninstalling the core HL7 software and reinstalling it corrected the registry error. (The most recent release of RoseTree included a specific registration of the Common Control OCX file in order to cure the reported registry issue and it appears to have been successful.)
There have been other reports of this error rising, but never with the history of installs and security updates as clearly maintained as here, owing to the fact that I was dealing with a relatively new operating system, and a totally new installation of all of the office software. Fortuitously, this led to the security updates being performed in a specific sequence and the the RMIM Designer being tested between the various sets of security updates.
Recommended Repair Steps
- Cleaned the system as follows:
- use the Control Panel to uninstall the HL7 RMIM Designer Installer
- use the Control Panel to uninstall RoseTree
- delete the contents of directory <<username>>/MyDocuments/MyShapes/HL7
- reboot the system (although this may not be necessary)
- use the Control Panel to uninstall the HL7 RMIM Designer Installer
- Re-install as:
- install RoseTree
- install the HL7 RMIM Designer Installer
- run the HL7 RMIM Designer Installer in order to place the Visio software for the RMIM Designer in <<username>>/MyDocuments/MyShapes/HL7
- Test the RMIM Designer.
- install RoseTree