<?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 Running Stored Process using VBA - Facing issues in passing prompt values in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Running-Stored-Process-using-VBA-Facing-issues-in-passing-prompt/m-p/439063#M5601</link>
    <description>&lt;P&gt;I am developing a tool in VBA which can interact with SAS and run a particular code based on user input. The SAS prompt 'Var_list' used in the stored process can accept a list of 4 variables 'Var1', 'Var2', 'Var3', 'Var4' (These values are present in cells F12:F14). I am using the following code to pass these values to the SAS prompt but my code doesn't work. Please suggest where am I going wrong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim sas As SASExcelAddIn&lt;BR /&gt;Set sas = Application.COMAddIns.Item("SAS.ExcelAddIn").Object&lt;/P&gt;&lt;P&gt;Set WB = ThisWorkbook&lt;BR /&gt;Set BG = WB.Worksheets("Tool")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;' This is how to define prompts when you add a stored process&lt;BR /&gt;Dim prompts As SASPrompts&lt;BR /&gt;Set prompts = New SASPrompts&lt;BR /&gt;&lt;BR /&gt;StpName = "/List_Stp_Test"&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;prompts.Add "Val_list", BG.Range("F12:F15").Value&lt;/FONT&gt;&amp;nbsp; &amp;nbsp; 'Not working&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;sas.Options.ShowSASLog = True&lt;BR /&gt;&lt;BR /&gt;Set a1 = Sheets("Tool").Range("F17")&lt;BR /&gt;&lt;BR /&gt;Sheets("Tool").Range("A1").Select&lt;BR /&gt;&lt;BR /&gt;sas.InsertStoredProcess StpName, a1, prompts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Feb 2018 20:43:01 GMT</pubDate>
    <dc:creator>Madhup</dc:creator>
    <dc:date>2018-02-21T20:43:01Z</dc:date>
    <item>
      <title>Running Stored Process using VBA - Facing issues in passing prompt values</title>
      <link>https://communities.sas.com/t5/Developers/Running-Stored-Process-using-VBA-Facing-issues-in-passing-prompt/m-p/439063#M5601</link>
      <description>&lt;P&gt;I am developing a tool in VBA which can interact with SAS and run a particular code based on user input. The SAS prompt 'Var_list' used in the stored process can accept a list of 4 variables 'Var1', 'Var2', 'Var3', 'Var4' (These values are present in cells F12:F14). I am using the following code to pass these values to the SAS prompt but my code doesn't work. Please suggest where am I going wrong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim sas As SASExcelAddIn&lt;BR /&gt;Set sas = Application.COMAddIns.Item("SAS.ExcelAddIn").Object&lt;/P&gt;&lt;P&gt;Set WB = ThisWorkbook&lt;BR /&gt;Set BG = WB.Worksheets("Tool")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;' This is how to define prompts when you add a stored process&lt;BR /&gt;Dim prompts As SASPrompts&lt;BR /&gt;Set prompts = New SASPrompts&lt;BR /&gt;&lt;BR /&gt;StpName = "/List_Stp_Test"&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;prompts.Add "Val_list", BG.Range("F12:F15").Value&lt;/FONT&gt;&amp;nbsp; &amp;nbsp; 'Not working&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;sas.Options.ShowSASLog = True&lt;BR /&gt;&lt;BR /&gt;Set a1 = Sheets("Tool").Range("F17")&lt;BR /&gt;&lt;BR /&gt;Sheets("Tool").Range("A1").Select&lt;BR /&gt;&lt;BR /&gt;sas.InsertStoredProcess StpName, a1, prompts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 20:43:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Running-Stored-Process-using-VBA-Facing-issues-in-passing-prompt/m-p/439063#M5601</guid>
      <dc:creator>Madhup</dc:creator>
      <dc:date>2018-02-21T20:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Running Stored Process using VBA - Facing issues in passing prompt values</title>
      <link>https://communities.sas.com/t5/Developers/Running-Stored-Process-using-VBA-Facing-issues-in-passing-prompt/m-p/443479#M5602</link>
      <description>&lt;P&gt;any errors/notes/warnings from the sas log? did you check this sample note out -&amp;nbsp;&lt;A href="http://support.sas.com/kb/42/983.html" target="_blank"&gt;http://support.sas.com/kb/42/983.html&lt;/A&gt; ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;there is a sugi paper too&amp;nbsp;&lt;A href="http://support.sas.com/resources/papers/proceedings11/012-2011.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings11/012-2011.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 19:58:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Running-Stored-Process-using-VBA-Facing-issues-in-passing-prompt/m-p/443479#M5602</guid>
      <dc:creator>saspert</dc:creator>
      <dc:date>2018-03-07T19:58:25Z</dc:date>
    </item>
  </channel>
</rss>

