<?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 Re: When run Excel macro second time I get &amp;quot;Run-time error '-2146233088 (80131500)': in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536738#M33077</link>
    <description>Hi Kurt, Thank you for your comment. I followed your suggestion and have tried to figure out which variable is the one causing this issue and I tried to initialize, clear, all variables before and after finishing the macro, but the issue still persists. I starting to believe that this is a bug of CreateObject("SASEGObjectModel.Application.7.1") Thanks,</description>
    <pubDate>Tue, 19 Feb 2019 14:36:52 GMT</pubDate>
    <dc:creator>konnos</dc:creator>
    <dc:date>2019-02-19T14:36:52Z</dc:date>
    <item>
      <title>When run Excel macro second time I get "Run-time error '-2146233088 (80131500)':</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536368#M33065</link>
      <description>Dear All, I am trying to create a macro in EXCEL to run multiple SAS Enterprise Guide .egp programs from Excel. (I am stack 2 days now) I managed to write a code to run one .egp program but if I run the macro again second time before I close the Excel workbook I get a run time error: "Run-time error '-2146233088 (80131500)': Path is not a directory 'C:': The filename, directory name, or volume label syntax is incorrect." This is very strange since I am not working on C: drive. Please see below the excel macro which crashes the second time I run it, at line: Set Proj = ApplicationObj.Open(Path &amp;amp; "SAS1.egp", "") '''''''''''''''''''''''''''' Sub RunFor() Dim ApplicationObj As Object 'Application Dim Proj As Object 'Project object Dim sasProgram As Object 'Code object (SAS program) Dim log1 As String Dim parmList As Variant Dim parm As Variant Dim Path As String Dim Full_Date As Variant Path = "M:\REPORT TO UNIT\KPIs_reports\Run SAS from Excel tests\" Worksheets("KPIs").Activate Full_Date = Cells(9, "C").Value 'On Error GoTo ErrHandler Set ApplicationObj = CreateObject("SASEGObjectModel.Application.7.1") Set Proj = ApplicationObj.Open(Path &amp;amp; "SAS1.egp", "") 'Set Proj = ApplicationObj.Open(Path &amp;amp; "SAS1.egp", "") Set parmList = Proj.Parameters MsgBox "Project has " &amp;amp; parmList.Count &amp;amp; " parameters." Set parm = parmList.Item(0) 'MsgBox parm.Name &amp;amp; " parameter has default value of " &amp;amp; parm.DefaultValue MsgBox parm.Name &amp;amp; " parameter" parm.Value = Full_Date MsgBox parm.Name &amp;amp; " parameter has been set to value of " &amp;amp; parm.Value Proj.Run 'Set Proj = Nothing 'Set ApplicationObj = Nothing Proj.SaveAs "M:\REPORT TO UNIT\KPIs_reports\Run SAS from Excel tests\SAS1.egp" Proj.Close ApplicationObj.Quit ''''''''&amp;amp;Preivous_Date ,is the prompt in SAS ActiveWorkbook.RefreshAll End End Sub '''''''''''''''''''''''''''''''''''''''''' Please let me know your thoughts. Thanks in advance.</description>
      <pubDate>Mon, 18 Feb 2019 07:11:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536368#M33065</guid>
      <dc:creator>konnos</dc:creator>
      <dc:date>2019-02-18T07:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: When run Excel macro second time I get "Run-time error '-2146233088 (80131500)':</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536369#M33066</link>
      <description>How can I post it with Format. it always makes the text continues</description>
      <pubDate>Mon, 18 Feb 2019 07:11:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536369#M33066</guid>
      <dc:creator>konnos</dc:creator>
      <dc:date>2019-02-18T07:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: When run Excel macro second time I get "Run-time error '-2146233088 (80131500)':</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536379#M33067</link>
      <description>&lt;P&gt;Use the {i} button for non-SAS code, text files, logs. Use the "little running man" for SAS code.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 07:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536379#M33067</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-18T07:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: When run Excel macro second time I get "Run-time error '-2146233088 (80131500)':</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536381#M33068</link>
      <description>&lt;P&gt;Software that behaves different on subsequent runs points to an uninitialized resource, where the state from the first execution carries over to the following executions.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 07:55:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536381#M33068</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-18T07:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: When run Excel macro second time I get "Run-time error '-2146233088 (80131500)':</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536395#M33070</link>
      <description>Thank you for your reply. I am new in this, can you please explain what is the {i} button please.</description>
      <pubDate>Mon, 18 Feb 2019 09:03:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536395#M33070</guid>
      <dc:creator>konnos</dc:creator>
      <dc:date>2019-02-18T09:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: When run Excel macro second time I get "Run-time error '-2146233088 (80131500)':</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536397#M33071</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/262095"&gt;@konnos&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thank you for your reply. I am new in this, can you please explain what is the {i} button please.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You see it on top of the main posting window, it's the 6th icon; "little running man" is the 7th.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 09:07:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536397#M33071</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-18T09:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: When run Excel macro second time I get "Run-time error '-2146233088 (80131500)':</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536406#M33072</link>
      <description>Sorry Kurt, I can not find any icons on top of the Posting window. I have attached a .txt file with my question. (I clicked reply, and it only allows me to write something in the box. Either "Rich Text", "HTML", and "Preview". No other options. Thanks</description>
      <pubDate>Mon, 18 Feb 2019 09:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536406#M33072</guid>
      <dc:creator>konnos</dc:creator>
      <dc:date>2019-02-18T09:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: When run Excel macro second time I get "Run-time error '-2146233088 (80131500)':</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536410#M33073</link>
      <description>&lt;P&gt;Make sure you are in "Rich Text" mode when posting.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 09:32:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536410#M33073</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-18T09:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: When run Excel macro second time I get "Run-time error '-2146233088 (80131500)':</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536417#M33074</link>
      <description>&lt;P&gt;My other argument is still valid. Different behaviour on subsequent runs points to some uninitialized resource, where the 'null' or random value encountered in the first run is replaced with some (default?) value and causes the second and following runs to fail.&lt;/P&gt;
&lt;P&gt;That is an observation from 4 decades of programming, not specific to VBA. I don't even touch that with a ten-yard pole, but you should review your code along this aspect. It might be that some module you use is not safe for reuse in the same context, and mandates a restart of Excel.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 09:39:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536417#M33074</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-18T09:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: When run Excel macro second time I get "Run-time error '-2146233088 (80131500)':</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536738#M33077</link>
      <description>Hi Kurt, Thank you for your comment. I followed your suggestion and have tried to figure out which variable is the one causing this issue and I tried to initialize, clear, all variables before and after finishing the macro, but the issue still persists. I starting to believe that this is a bug of CreateObject("SASEGObjectModel.Application.7.1") Thanks,</description>
      <pubDate>Tue, 19 Feb 2019 14:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536738#M33077</guid>
      <dc:creator>konnos</dc:creator>
      <dc:date>2019-02-19T14:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: When run Excel macro second time I get "Run-time error '-2146233088 (80131500)':</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536741#M33078</link>
      <description>&lt;P&gt;If you could successfully narrow it down to this, opening a track with SAS technical support is now in order.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 14:44:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/When-run-Excel-macro-second-time-I-get-quot-Run-time-error/m-p/536741#M33078</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-19T14:44:43Z</dc:date>
    </item>
  </channel>
</rss>

