<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>VBA - Interface Error: 0x80040502</title><link>https://communities.bentley.com/products/microstation/w/microstation__wiki/22585/vba-interface-error-0x80040502</link><description>Bentley View, MicroStation, PowerDraft</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>VBA - Interface Error: 0x80040502</title><link>https://communities.bentley.com/products/microstation/w/microstation__wiki/22585/vba-interface-error-0x80040502</link><pubDate>Wed, 15 Jul 2015 15:44:29 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:43dc734f-3b8a-4e15-9134-120c52d868b8</guid><dc:creator>Tristan Anderson</dc:creator><comments>https://communities.bentley.com/products/microstation/w/microstation__wiki/22585/vba-interface-error-0x80040502#comments</comments><description>Current Revision posted to MicroStation Wiki by Tristan Anderson on 7/15/2015 3:44:29 PM&lt;br /&gt;
&lt;h1&gt;&lt;b&gt;&lt;img style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;border-top-width:0px;" alt=" " src="http://communities.bentley.com/cfs-file.ashx/__key/communityserver-components-sitefiles/TSG-Logo.png" width="189" height="60" /&gt;&lt;/b&gt;&lt;/h1&gt;
&lt;table style="border-top:#dce5f0 0px solid;border-right:#dce5f0 0px solid;width:500px;border-bottom:#dce5f0 0px solid;border-left:#dce5f0 0px solid;background-color:#dce5f0;" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;span style="font-size:medium;"&gt;&lt;b&gt;Applies To&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;Product(s):&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MicroStation&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;Version(s):&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;08.11.09.578 &lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;Environment:&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Windows 7 32 bit,Windows 7 64 bit&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;Area:&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Programming&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;Subarea:&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;VBA&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;Original Author:&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tristan Anderson, Bentley Technical Support Group&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Symptoms&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When trying to start a VBA Macro, the following error in the status bar of MicroStation might appear:&lt;/p&gt;
&lt;p&gt;VBA interface error: Comp manager cannot be created - 0x80040502&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Troubleshooting Steps&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The problem is the result of a lacking subdirectory for the language version of VBA. When installing VBA regional settings of Appeal to be checked.&lt;/p&gt;
&lt;p&gt;For example, a German operating system does not distinguish between the German versions:&lt;/p&gt;
&lt;blockquote style="margin-right:0px;" dir="ltr"&gt;
&lt;p&gt;Germany (1031)&lt;/p&gt;
&lt;p&gt;Austria (3079)&lt;/p&gt;
&lt;p&gt;Switzerland (2055)&lt;/p&gt;
&lt;p&gt;Liechtenstein (5127)&lt;/p&gt;
&lt;p&gt;Luxembourg (4103)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;It is created for Germany during the installation in only a 1031 folder.&lt;/p&gt;
&lt;p&gt;However, if we use a VBA macro to start, the country code folder is in accordance with the Regional Settings searched and not found, so it comes to this error message.&lt;/p&gt;
&lt;p&gt;The problem can be corrected by manually creating and copying contesnt in this missing Folder from the 1031 folder.&lt;/p&gt;
&lt;p&gt;You can find the folder&lt;/p&gt;
&lt;p&gt;at an English Windows x64:&lt;/p&gt;
&lt;p&gt;C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6&lt;/p&gt;
&lt;p&gt;at an English Windows x32:&lt;/p&gt;
&lt;p&gt;C:\Program Files\Common Files\microsoft shared\VBA\VBA6&lt;/p&gt;
&lt;p&gt;or instead of &amp;quot;Program Files&amp;quot;, a German Windows version will have &amp;quot;Programs&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: VBAWindows 7 32 bit, MicroStation, Windows 7 64 bit, Programming, en, 08.11.09.578, SELECTsupport&lt;/div&gt;
</description></item></channel></rss>