<?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: Can I set a multi-item text prompt via AMO and VBA? in Microsoft Integration with SAS</title>
    <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Can-I-set-a-multi-item-text-prompt-via-AMO-and-VBA/m-p/101844#M1207</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same question and have been unable to find an answer.&amp;nbsp; Did you ever figure this out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Aug 2015 20:25:44 GMT</pubDate>
    <dc:creator>jgutierrez2</dc:creator>
    <dc:date>2015-08-20T20:25:44Z</dc:date>
    <item>
      <title>Can I set a multi-item text prompt via AMO and VBA?</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Can-I-set-a-multi-item-text-prompt-via-AMO-and-VBA/m-p/101843#M1206</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;I have a stored process containing a multi-item text prompt, i.e. Text, User Enters Values, Multiple Values.&amp;nbsp; In the prompt manager GUI, I enter the text, press Add, and all current values display in the listbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like the end user to be able to specify this list in an Excel range (column).&amp;nbsp; I would then use VBA to retrieve those values, set the value(s) of the prompt, then refresh the stored process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this simple subroutine, modified from the AMO help, SASStoredProcess.SetParameter Method topic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub RefreshStoredProcessWithPrompts()&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim sas As SASExcelAddIn&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set sas = Application.COMAddIns.Item("SAS.ExcelAddIn").Object&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim list As SASStoredProcesses&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set list = sas.GetStoredProcesses(Sheet1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim stp As SASStoredProcess&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set stp = list.Item(1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stp.SetParameter "where_value_1", "foo"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stp.SetParameter "where_value_1", "bar"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stp.SetParameter "where_value_1", "blah"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stp.Refresh&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, I didn't really expect this to work; as I expected, the last setting ("blah") wins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I set a&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt; multi-item&lt;/STRONG&gt;&lt;/SPAN&gt; text prompt value using AMO and VBA?&amp;nbsp; My stored process uses the resultant macro variables set by the prompt manager to build an IN ( ) list.&amp;nbsp; It will be much faster for them to just paste the desired list into Excel and run the macro than to Modify the stored process and key in the new list one item at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 02:10:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Can-I-set-a-multi-item-text-prompt-via-AMO-and-VBA/m-p/101843#M1206</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2013-10-03T02:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set a multi-item text prompt via AMO and VBA?</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Can-I-set-a-multi-item-text-prompt-via-AMO-and-VBA/m-p/101844#M1207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same question and have been unable to find an answer.&amp;nbsp; Did you ever figure this out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 20:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Can-I-set-a-multi-item-text-prompt-via-AMO-and-VBA/m-p/101844#M1207</guid>
      <dc:creator>jgutierrez2</dc:creator>
      <dc:date>2015-08-20T20:25:44Z</dc:date>
    </item>
  </channel>
</rss>

