<?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: run excel macro with parameter in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499440#M132915</link>
    <description>&lt;P&gt;I would highly recommend you drop the DDE, its is decades out of support and doesn't work in a lot of situations.&lt;/P&gt;
&lt;P&gt;As for the parameter, can you not put that into a cell, and point your macro to that cell rather than using a parameter?&lt;/P&gt;
&lt;P&gt;Looks like your using VBA to copy a file, seems like a mess of a process, SAS -&amp;gt; VBA -&amp;gt; File System.&amp;nbsp; SAS can move files, but there are better tools available to IT to do these kind of logged moves.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Sep 2018 11:29:15 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-09-27T11:29:15Z</dc:date>
    <item>
      <title>run excel macro with parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499438#M132914</link>
      <description>&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;Hello&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;I have a problem with running vba macros with the parameter from sas.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;Someone has a solution?!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;my macro:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;Sub Refre(Nr As Integer, TF As Integer, NrCoopy As Integer)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileCopy "C:\FX\Terminal\Ex_" &amp;amp; Nr &amp;amp; "_" &amp;amp; TF &amp;amp; "_1.xlsx", "C:\FX\Terminal\Ex_10" &amp;amp; NrCoopy &amp;amp; "_" &amp;amp; TimeFrame &amp;amp; "_1.xlsx"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveWorkbook.UpdateLink Name:=ThisWorkbook.Path &amp;amp; "\Ex_10" &amp;amp; NrCoopy &amp;amp; "_" &amp;amp; TF &amp;amp; "_1.xlsx", Type:= _&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xlExcelLinks&lt;BR /&gt;End Sub&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;Sub Run()&lt;BR /&gt;Call Refre(0, 5, 1)&lt;BR /&gt;End Sub&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;this work&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME CMDS DDE 'EXCEL|SYSTEM';
DATA _NULL_;
FILE CMDS;
PUT %unquote(%str(%'[RUN("Run")]%'));
RUN;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;this does not work&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME CMDS DDE 'EXCEL|SYSTEM';
DATA _NULL_;
FILE CMDS;
PUT %unquote(%str(%'[RUN("&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;Refre&lt;/SPAN&gt;&lt;/SPAN&gt;(&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;0, 5, 1&lt;/SPAN&gt;&lt;/SPAN&gt;)")]%'));
RUN;
QUIT&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;there is some way that the secend way would work:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;
&lt;/LI-WRAPPER&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;thank you for help&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;best &lt;SPAN class="short_text"&gt;regards&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 11:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499438#M132914</guid>
      <dc:creator>makset</dc:creator>
      <dc:date>2018-09-27T11:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: run excel macro with parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499440#M132915</link>
      <description>&lt;P&gt;I would highly recommend you drop the DDE, its is decades out of support and doesn't work in a lot of situations.&lt;/P&gt;
&lt;P&gt;As for the parameter, can you not put that into a cell, and point your macro to that cell rather than using a parameter?&lt;/P&gt;
&lt;P&gt;Looks like your using VBA to copy a file, seems like a mess of a process, SAS -&amp;gt; VBA -&amp;gt; File System.&amp;nbsp; SAS can move files, but there are better tools available to IT to do these kind of logged moves.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 11:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499440#M132915</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-27T11:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: run excel macro with parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499442#M132917</link>
      <description>&lt;P&gt;No idea if this is relevant, but have you tried with semicolons between the parameters instead? If you are running Excel in a national language setting that uses semicolons rather than commas between parameters, the Excel command interface may want the same thing in VBA calls.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 11:46:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499442#M132917</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2018-09-27T11:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: run excel macro with parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499464#M132923</link>
      <description>&lt;P&gt;ok&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;is any other way to run the excel macro&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;I have sas 9.2 ts 2mo ms office 2010&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;thx&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 12:34:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499464#M132923</guid>
      <dc:creator>makset</dc:creator>
      <dc:date>2018-09-27T12:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: run excel macro with parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499488#M132924</link>
      <description>&lt;P&gt;Go back to square one: what is this macro supposed to do?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 12:58:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499488#M132924</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-09-27T12:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: run excel macro with parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499531#M132946</link>
      <description>&lt;P&gt;Test it with a very basic Excel macro. Sorry this isn't text but here's what I usually use.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You also want to verify&amp;nbsp; you have XCMD enabled, though I assume you've already tested all of this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can see the macro calls at the bottom of the programs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="delete_dde_call.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23615i1FC908D414EA097E/image-size/large?v=v2&amp;amp;px=999" role="button" title="delete_dde_call.JPG" alt="delete_dde_call.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 14:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499531#M132946</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-27T14:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: run excel macro with parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499592#M132965</link>
      <description>&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;it just copies the file and updates the link&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 16:45:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499592#M132965</guid>
      <dc:creator>makset</dc:creator>
      <dc:date>2018-09-27T16:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: run excel macro with parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499599#M132970</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;As for the parameter, can you not put that into a cell, and point your macro to that cell rather than using a parameter?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;it is possible to turn on a button in a specific sheet&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 16:55:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499599#M132970</guid>
      <dc:creator>makset</dc:creator>
      <dc:date>2018-09-27T16:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: run excel macro with parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499790#M133030</link>
      <description>&lt;P&gt;Sorry, what do you mean button, do you mean an Excel VBA Button object?&amp;nbsp; SAS provides functionality to move data between the two systems, it does not implement all Excel or VBA functionality.&amp;nbsp; If you want to use that then you need to do that in Excel.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 07:15:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499790#M133030</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-28T07:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: run excel macro with parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499924#M133064</link>
      <description>&lt;P&gt;Buttons are calls to macros so yes, you should be able to do that. However, DDE commands are for Excel Version 4 (that numbering was used once upon a time) and a lot of the newer commands are not available.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 15:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-excel-macro-with-parameter/m-p/499924#M133064</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-28T15:08:02Z</dc:date>
    </item>
  </channel>
</rss>

