This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

RMIM Designer (Visio) OCX Errors

From HL7Wiki
Jump to navigation Jump to search

Dealing With Microsoft VBA Error "Compile error: Automation error"

RMIMdesignerAutomationError.png

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 un-proven link. (Having said that, there are no reports within HL7 of this occuring on 32-bit windows installations, including the author's.)

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:

  1. Uninstall my 32-bit Office 2010, including 32-bit Visio 2010
  2. 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.
  3. Installed 64-bit Microsoft Office 2010 to provide Word, Excel, Access, and PowerPoint software.
  4. Allowed all Office 2010 updates to be applied (there were over 30 of them).
  5. 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.)
  6. Installed RoseTree, the HL7 RMIM Designer Installer and then the HL7 RMIM Designer in Visio.
  7. Tested the RMIM Designer solution and it worked correctly.
  8. 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.
  9. Again tested the RMIM Designer and it failed with an error message box from Microsoft Visual Basic that said "Compile error: Automation error"
  10. Made no changes to any software, but rather cleaned up my system and reinstalled as follows:
    1. used the Control Panel to uninstall the HL7 RMIM Designer Installer
    2. used the Control Panel to uninstall RoseTree
    3. deleted the contents of directory <<username>>/MyDocuments/MyShapes/HL7
    4. rebooted the system (although this may not be necessary)
  11. Re-installed as:
    1. installed RoseTree
    2. installed the HL7 RMIM Designer Installer
    3. ran the HL7 RMIM Designer Installer in order to place the Visio software for the RMIM Designer in <<username>>/MyDocuments/MyShapes/HL7
  12. 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

  1. Cleaned the system as follows:
    1. use the Control Panel to uninstall the HL7 RMIM Designer Installer
    2. use the Control Panel to uninstall RoseTree
    3. delete the contents of directory <<username>>/MyDocuments/MyShapes/HL7
    4. reboot the system (although this may not be necessary)
  2. Re-install as:
    1. install RoseTree
    2. install the HL7 RMIM Designer Installer
    3. run the HL7 RMIM Designer Installer in order to place the Visio software for the RMIM Designer in <<username>>/MyDocuments/MyShapes/HL7
    4. Test the RMIM Designer.