<?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: Invoke VBA command or run VBA macro suning SAS EG in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invoke-VBA-command-or-run-VBA-macro-suning-SAS-EG/m-p/211157#M15823</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot use DDE from EG (which connects to "headless" SAS sessions), since DDE relies on Windows messages and requires the SAS session to run in a windowing environment (and on the same machine as the process it is communicating with).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;However, you can run VBSCript from EG if X commands are allowed on your server.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;/* write the vbs file */&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;_null_&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;file&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'c:\temp\test.vbs'&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"Set objFSO=CreateObject(""Scripting.FileSystemObject"")"&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"outFile=""c:\temp\test.txt"""&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"Set objFile = objFSO.CreateTextFile(outFile,True)"&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"objFile.Write ""test string"" &amp;amp; vbCrLf"&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"objFile.Close"&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;/* execute the vbs file */&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;X&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'c:\temp\test.vbs'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jun 2015 14:11:53 GMT</pubDate>
    <dc:creator>CaseySmith</dc:creator>
    <dc:date>2015-06-22T14:11:53Z</dc:date>
    <item>
      <title>Invoke VBA command or run VBA macro suning SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invoke-VBA-command-or-run-VBA-macro-suning-SAS-EG/m-p/211154#M15820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any way of running VBA macro using SAS EG. I know in base sas it can be done using DDE. But how to do that using SAS EG. I am using EG 5.1. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 12:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invoke-VBA-command-or-run-VBA-macro-suning-SAS-EG/m-p/211154#M15820</guid>
      <dc:creator>anu_ha</dc:creator>
      <dc:date>2015-06-22T12:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke VBA command or run VBA macro suning SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invoke-VBA-command-or-run-VBA-macro-suning-SAS-EG/m-p/211155#M15821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VB for Applications is a programming environment within the office application.&amp;nbsp; DDE is a connector with which you can send code into an open Office Component.&amp;nbsp; You should be able to do the same in EG, though I don't use it. &lt;/P&gt;&lt;P&gt;I would however question why you would want to do this.&amp;nbsp; If a VBA macro needs to be run, set it to run On_Open, that way it will be run once the file is opened, rather than the need to push it to do it immediately.&amp;nbsp; Otherwise a more complete image of what you are trying to achieve is needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 13:34:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invoke-VBA-command-or-run-VBA-macro-suning-SAS-EG/m-p/211155#M15821</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-06-22T13:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke VBA command or run VBA macro suning SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invoke-VBA-command-or-run-VBA-macro-suning-SAS-EG/m-p/211156#M15822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry DDE is not available in SAS EG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 13:54:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invoke-VBA-command-or-run-VBA-macro-suning-SAS-EG/m-p/211156#M15822</guid>
      <dc:creator>anu_ha</dc:creator>
      <dc:date>2015-06-22T13:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke VBA command or run VBA macro suning SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invoke-VBA-command-or-run-VBA-macro-suning-SAS-EG/m-p/211157#M15823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot use DDE from EG (which connects to "headless" SAS sessions), since DDE relies on Windows messages and requires the SAS session to run in a windowing environment (and on the same machine as the process it is communicating with).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;However, you can run VBSCript from EG if X commands are allowed on your server.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;/* write the vbs file */&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;_null_&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;file&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'c:\temp\test.vbs'&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"Set objFSO=CreateObject(""Scripting.FileSystemObject"")"&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"outFile=""c:\temp\test.txt"""&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"Set objFile = objFSO.CreateTextFile(outFile,True)"&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"objFile.Write ""test string"" &amp;amp; vbCrLf"&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"objFile.Close"&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;/* execute the vbs file */&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;X&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'c:\temp\test.vbs'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 14:11:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invoke-VBA-command-or-run-VBA-macro-suning-SAS-EG/m-p/211157#M15823</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2015-06-22T14:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke VBA command or run VBA macro suning SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invoke-VBA-command-or-run-VBA-macro-suning-SAS-EG/m-p/211158#M15824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can excel Libname be used to invoke VBA macro in Excel?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 15:02:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invoke-VBA-command-or-run-VBA-macro-suning-SAS-EG/m-p/211158#M15824</guid>
      <dc:creator>anu_ha</dc:creator>
      <dc:date>2015-06-22T15:02:48Z</dc:date>
    </item>
  </channel>
</rss>

