<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cannot Create ActiveX Component Excel Macro in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/cannot-create-activex-component-excel-macro/m-p/9261272#M104751</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a code that runs a macro inside an excel sheet which oddly sometimes works and sometimes doesnt. Same code, no changes at all.&lt;/P&gt;&lt;P&gt;Quite often I get the error saying "Cannot Create ActiveX Component"&lt;/P&gt;&lt;P&gt;When I try and run the rule multiple times back to back it cant run it after the first time.&lt;/P&gt;&lt;P&gt;Im thinking its because the file is open in a hidden state although I told ilogic to save &amp;amp; close the excel file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the code below:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;xlsxPath&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;String&lt;/SPAN&gt;

			&lt;SPAN style="color: #800000;"&gt;xlsxPath&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;"C:\Users\tm04.smeric\Desktop\Meric\WELD DETAIL LIST.xlsm"&lt;/SPAN&gt;
			&lt;SPAN style="color: #808080;"&gt;'''&lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;'''&lt;/SPAN&gt;
			&lt;SPAN style="color: #800080;"&gt;GoExcel&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Open&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xlsxPath&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Sheet1"&lt;/SPAN&gt;)

			&lt;SPAN style="color: #808080;"&gt;'''&lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;MACRO'''&lt;/SPAN&gt;
			&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;XL&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Object&lt;/SPAN&gt;
&lt;SPAN style="color: #808080;"&gt;'				XL = CreateObject("Excel.Application")&lt;/SPAN&gt;
				&lt;SPAN style="color: #800000;"&gt;XL&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;GetObject&lt;/SPAN&gt;(, &lt;SPAN style="color: #008080;"&gt;"Excel.Application"&lt;/SPAN&gt;)	
				&lt;SPAN style="color: #800000;"&gt;XL&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Run&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Module1.clearMacro"&lt;/SPAN&gt;)
				
				
			&lt;SPAN style="color: #800080;"&gt;GoExcel&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;DisplayAlerts&lt;/SPAN&gt; = &lt;SPAN style="color: #ff0000;"&gt;False&lt;BR /&gt;&lt;SPAN style="color: #808080;"&gt;                      ' GoExcel.Save()&lt;/SPAN&gt; &lt;BR /&gt;&lt;SPAN style="color: #808080;"&gt;                      ' GoExcel.Close()&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thanks in advance &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jan 2020 10:45:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-01-20T10:45:58Z</dc:date>
    <item>
      <title>Cannot Create ActiveX Component Excel Macro</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/cannot-create-activex-component-excel-macro/m-p/9261272#M104751</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a code that runs a macro inside an excel sheet which oddly sometimes works and sometimes doesnt. Same code, no changes at all.&lt;/P&gt;&lt;P&gt;Quite often I get the error saying "Cannot Create ActiveX Component"&lt;/P&gt;&lt;P&gt;When I try and run the rule multiple times back to back it cant run it after the first time.&lt;/P&gt;&lt;P&gt;Im thinking its because the file is open in a hidden state although I told ilogic to save &amp;amp; close the excel file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the code below:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;xlsxPath&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;String&lt;/SPAN&gt;

			&lt;SPAN style="color: #800000;"&gt;xlsxPath&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;"C:\Users\tm04.smeric\Desktop\Meric\WELD DETAIL LIST.xlsm"&lt;/SPAN&gt;
			&lt;SPAN style="color: #808080;"&gt;'''&lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;'''&lt;/SPAN&gt;
			&lt;SPAN style="color: #800080;"&gt;GoExcel&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Open&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;xlsxPath&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Sheet1"&lt;/SPAN&gt;)

			&lt;SPAN style="color: #808080;"&gt;'''&lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;MACRO'''&lt;/SPAN&gt;
			&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;XL&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Object&lt;/SPAN&gt;
&lt;SPAN style="color: #808080;"&gt;'				XL = CreateObject("Excel.Application")&lt;/SPAN&gt;
				&lt;SPAN style="color: #800000;"&gt;XL&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;GetObject&lt;/SPAN&gt;(, &lt;SPAN style="color: #008080;"&gt;"Excel.Application"&lt;/SPAN&gt;)	
				&lt;SPAN style="color: #800000;"&gt;XL&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Run&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"Module1.clearMacro"&lt;/SPAN&gt;)
				
				
			&lt;SPAN style="color: #800080;"&gt;GoExcel&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;DisplayAlerts&lt;/SPAN&gt; = &lt;SPAN style="color: #ff0000;"&gt;False&lt;BR /&gt;&lt;SPAN style="color: #808080;"&gt;                      ' GoExcel.Save()&lt;/SPAN&gt; &lt;BR /&gt;&lt;SPAN style="color: #808080;"&gt;                      ' GoExcel.Close()&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thanks in advance &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 10:45:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/cannot-create-activex-component-excel-macro/m-p/9261272#M104751</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-20T10:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Create ActiveX Component Excel Macro</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/cannot-create-activex-component-excel-macro/m-p/9261284#M104752</link>
      <description>&lt;P&gt;I also get the error if I close excel from the task manager as I assume it fails to activate macros unless you open the excel on startup and save it after you open VBA&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 10:56:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/cannot-create-activex-component-excel-macro/m-p/9261284#M104752</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-20T10:56:35Z</dc:date>
    </item>
  </channel>
</rss>

