<?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 Problem Running Excel VBA Macro through SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Problem-Running-Excel-VBA-Macro-through-SAS/m-p/276060#M55278</link>
    <description>&lt;P&gt;I have following code which I have been running for couple months in my daily job. But since yesterday it stopped working. It opens the excel file and then it does not do anything (not running the VBA macro at all). Below is my code. Please let me know if any settings need to be changed...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let macDrv=c:\Temp\Reports;&lt;/P&gt;
&lt;P&gt;%let macBook=Macro_Format_Scorecard.xlsm;&lt;/P&gt;
&lt;P&gt;%let macName=FormatAllReports;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename exl dde 'excel|system';&lt;/P&gt;
&lt;P&gt;options noxwait noxsync;&lt;/P&gt;
&lt;P&gt;x "'C:\Program Files\Microsoft Office\Office15\EXCEL.EXE' &amp;amp;macDrv.\&amp;amp;macBook";&lt;/P&gt;
&lt;P&gt;data _NULL_;&lt;/P&gt;
&lt;P&gt;x=sleep(5);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;/P&gt;
&lt;P&gt;file exl;&lt;/P&gt;
&lt;P&gt;put '[RUN("'"&amp;amp;macBook"'!'"&amp;amp;macName"'",FALSE)]';&lt;/P&gt;
&lt;P&gt;put '[ERROR(FALSE)]';&lt;/P&gt;
&lt;P&gt;put '[SAVE()]';&lt;/P&gt;
&lt;P&gt;put '[CLOSE()]';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;/P&gt;
&lt;P&gt;file exl;&lt;/P&gt;
&lt;P&gt;put '[QUIT()]';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jun 2016 18:38:45 GMT</pubDate>
    <dc:creator>pp2014</dc:creator>
    <dc:date>2016-06-08T18:38:45Z</dc:date>
    <item>
      <title>Problem Running Excel VBA Macro through SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-Running-Excel-VBA-Macro-through-SAS/m-p/276060#M55278</link>
      <description>&lt;P&gt;I have following code which I have been running for couple months in my daily job. But since yesterday it stopped working. It opens the excel file and then it does not do anything (not running the VBA macro at all). Below is my code. Please let me know if any settings need to be changed...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let macDrv=c:\Temp\Reports;&lt;/P&gt;
&lt;P&gt;%let macBook=Macro_Format_Scorecard.xlsm;&lt;/P&gt;
&lt;P&gt;%let macName=FormatAllReports;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename exl dde 'excel|system';&lt;/P&gt;
&lt;P&gt;options noxwait noxsync;&lt;/P&gt;
&lt;P&gt;x "'C:\Program Files\Microsoft Office\Office15\EXCEL.EXE' &amp;amp;macDrv.\&amp;amp;macBook";&lt;/P&gt;
&lt;P&gt;data _NULL_;&lt;/P&gt;
&lt;P&gt;x=sleep(5);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;/P&gt;
&lt;P&gt;file exl;&lt;/P&gt;
&lt;P&gt;put '[RUN("'"&amp;amp;macBook"'!'"&amp;amp;macName"'",FALSE)]';&lt;/P&gt;
&lt;P&gt;put '[ERROR(FALSE)]';&lt;/P&gt;
&lt;P&gt;put '[SAVE()]';&lt;/P&gt;
&lt;P&gt;put '[CLOSE()]';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;/P&gt;
&lt;P&gt;file exl;&lt;/P&gt;
&lt;P&gt;put '[QUIT()]';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 18:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-Running-Excel-VBA-Macro-through-SAS/m-p/276060#M55278</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2016-06-08T18:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Running Excel VBA Macro through SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-Running-Excel-VBA-Macro-through-SAS/m-p/276066#M55279</link>
      <description>&lt;P&gt;If it stopped working and worked before it's likely not the code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Verify that nothing else has changed, permissions, SAS settings, security settings, version of Excel, and path of file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 18:56:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-Running-Excel-VBA-Macro-through-SAS/m-p/276066#M55279</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-08T18:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Running Excel VBA Macro through SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-Running-Excel-VBA-Macro-through-SAS/m-p/276068#M55281</link>
      <description>&lt;P&gt;Thanks Reeza.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I run VBA macro, then it works. It formats the Report. But&amp;nbsp;when I let SAS run the Same Madcro, it does not work.. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 19:00:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-Running-Excel-VBA-Macro-through-SAS/m-p/276068#M55281</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2016-06-08T19:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Running Excel VBA Macro through SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-Running-Excel-VBA-Macro-through-SAS/m-p/276069#M55282</link>
      <description>&lt;P&gt;I have found at least one other application, Cisco Jabber, that if running interferes with dde calls and have anecdotal evidence there may be others. In the case of Jabber it is not sufficient to stop running the program but you have to use task manager to kill the process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you may check with your IT folks about any new or updated program installed since the last time you successfully ran the SAS program.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 14:34:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-Running-Excel-VBA-Macro-through-SAS/m-p/276069#M55282</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-06-09T14:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Running Excel VBA Macro through SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-Running-Excel-VBA-Macro-through-SAS/m-p/276112#M55297</link>
      <description>&lt;P&gt;SAS called macro fine previously with this code and doesn't now? Is that correct?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, something else is the issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Figure out what changed between last run and this and test each change.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 21:07:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-Running-Excel-VBA-Macro-through-SAS/m-p/276112#M55297</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-08T21:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Running Excel VBA Macro through SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-Running-Excel-VBA-Macro-through-SAS/m-p/276133#M55306</link>
      <description>&lt;P&gt;Yes, &amp;nbsp;SAS code worked perfectly until yesterday.. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 23:00:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-Running-Excel-VBA-Macro-through-SAS/m-p/276133#M55306</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2016-06-08T23:00:14Z</dc:date>
    </item>
  </channel>
</rss>

