<?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 MAcro - How to give the file path dynamic in VBA Code in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Run-MAcro-How-to-give-the-file-path-dynamic-in-VBA-Code/m-p/55658#M9966</link>
    <description>Also dumb and easy way - make macro read file path from some cell and update it before running macro.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Andrey Kudinov&lt;BR /&gt;Project Manager&lt;BR /&gt;MobileTelesystems PJSC&lt;BR /&gt;Europe/Moscow&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Wed, 02 Dec 2020 16:01:00 GMT</pubDate>
    <dc:creator>AndreyKudinov</dc:creator>
    <dc:date>2020-12-02T16:01:00Z</dc:date>
    <item>
      <title>Run MAcro - How to give the file path dynamic in VBA Code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Run-MAcro-How-to-give-the-file-path-dynamic-in-VBA-Code/m-p/55656#M9964</link>
      <description>Hello everyone,&lt;BR /&gt;&lt;BR /&gt;I have recorded the excel macro for pivot table exceution. In that macro code, the filepath was also recorded which i am referring the workbook file. But i need a dynamic file path to excute a macro for this pivot table.&lt;BR /&gt;&lt;BR /&gt;Can anyone help me for this macro coding which i need to implement in blueprism&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Janani PR&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Dec 2020 11:21:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Run-MAcro-How-to-give-the-file-path-dynamic-in-VBA-Code/m-p/55656#M9964</guid>
      <dc:creator>JananiPR1</dc:creator>
      <dc:date>2020-12-02T11:21:00Z</dc:date>
    </item>
    <item>
      <title>RE: Run MAcro - How to give the file path dynamic in VBA Code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Run-MAcro-How-to-give-the-file-path-dynamic-in-VBA-Code/m-p/55657#M9965</link>
      <description>According to the &lt;SPAN style="text-decoration: underline;"&gt;&lt;A href="https://docs.microsoft.com/en-us/office/vba/api/Excel.Application.Run#:~:text=Application.Run%20method%20%28Excel%29%20Runs%20a%20macro%20or%20calls,run%20a%20function%20in%20a%20DLL%20or%20XLL." target="_blank" rel="noopener"&gt;Microsoft docs&lt;/A&gt;&lt;/SPAN&gt;, you can pass up to 30 arguments to a macro. Blue Prism by default does not pass any parameters into macros, nor does it retrieve any return information.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You could try this code, which should handle a variable number of parameters, although I haven't actually tested it yet. It will also return a value from the macro, if any.&lt;BR /&gt;
&lt;PRE class="language-csharp"&gt;&lt;CODE&gt;' Inputs: Handle (number), Macro Name (text), Parameters (collection)
' Outputs: Return Value (text)
'
' Package any arguments to pass into a single-row collection.

If Parameters.Columns.Count = 0 Then
	Return_Value = GetInstance(Handle).Run(Macro_Name)
ElseIf Parameters.Rows.Count &amp;lt; 1 Then
	Throw New Exception("Parameters must contain at least 1 row")
ElseIf Parameters.Columns.Count = 1 Then
	Return_Value = GetInstance(Handle).Run(Macro_Name, Parameters.Rows(0))
ElseIf Parameters.Columns.Count = 2 Then
	Return_Value = GetInstance(Handle).Run(Macro_Name, Parameters.Rows(0), Parameters.Rows(1))
ElseIf Parameters.Columns.Count = 3 Then
	Return_Value = GetInstance(Handle).Run(Macro_Name, Parameters.Rows(0), Parameters.Rows(1), Parameters.Rows(2))
ElseIf Parameters.Columns.Count = 4 Then
	Return_Value = GetInstance(Handle).Run(Macro_Name, Parameters.Rows(0), Parameters.Rows(1), Parameters.Rows(2), Parameters.Rows(3))
ElseIf Parameters.Columns.Count = 5 Then
	Return_Value = GetInstance(Handle).Run(Macro_Name, Parameters.Rows(0), Parameters.Rows(1), Parameters.Rows(2), Parameters.Rows(3), Parameters.Rows(4))
Else
	Throw New Exception("Parameters cannot contain more than 5 fields")
End If​&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nicholas Zejdlik&lt;BR /&gt;RPA Developer&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Dec 2020 13:57:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Run-MAcro-How-to-give-the-file-path-dynamic-in-VBA-Code/m-p/55657#M9965</guid>
      <dc:creator>NicholasZejdlik</dc:creator>
      <dc:date>2020-12-02T13:57:00Z</dc:date>
    </item>
    <item>
      <title>RE: Run MAcro - How to give the file path dynamic in VBA Code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Run-MAcro-How-to-give-the-file-path-dynamic-in-VBA-Code/m-p/55658#M9966</link>
      <description>Also dumb and easy way - make macro read file path from some cell and update it before running macro.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Andrey Kudinov&lt;BR /&gt;Project Manager&lt;BR /&gt;MobileTelesystems PJSC&lt;BR /&gt;Europe/Moscow&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Dec 2020 16:01:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Run-MAcro-How-to-give-the-file-path-dynamic-in-VBA-Code/m-p/55658#M9966</guid>
      <dc:creator>AndreyKudinov</dc:creator>
      <dc:date>2020-12-02T16:01:00Z</dc:date>
    </item>
    <item>
      <title>RE: Run MAcro - How to give the file path dynamic in VBA Code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Run-MAcro-How-to-give-the-file-path-dynamic-in-VBA-Code/m-p/55659#M9967</link>
      <description>good one &lt;A biobubblekey="6c2e0c04-bfc9-4736-8c77-d1b66d0b75e2" href="https://community.blueprism.com/network/profile?UserKey=6c2e0c04-bfc9-4736-8c77-d1b66d0b75e2" target="_blank" rel="noopener"&gt;Andrey&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;.this is really nice idea&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nilesh Jadhav &lt;BR /&gt;Senior RPA Specialist&lt;BR /&gt;ADP&lt;BR /&gt;India&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Dec 2020 17:54:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Run-MAcro-How-to-give-the-file-path-dynamic-in-VBA-Code/m-p/55659#M9967</guid>
      <dc:creator>NileshJadhavBP</dc:creator>
      <dc:date>2020-12-02T17:54:00Z</dc:date>
    </item>
    <item>
      <title>RE: Run MAcro - How to give the file path dynamic in VBA Code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Run-MAcro-How-to-give-the-file-path-dynamic-in-VBA-Code/m-p/55660#M9968</link>
      <description>&lt;P&gt;Hi Janani&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well at very first you need to tweak the macro to pass arguments like Macroname(filepath as string). Once that is done one needs to enter the below code stage in excel vbo&amp;nbsp;&lt;/P&gt;
&lt;P&gt;GetInstance(Handle).Run(Macro_Name,Param1)&lt;BR /&gt;&lt;BR /&gt;you have to pass 3 inputs&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. handle&amp;nbsp;&lt;BR /&gt;2. Macro name&amp;nbsp;&lt;BR /&gt;3. Param1&amp;nbsp; 'pass file path as a variable into param1 as input&amp;nbsp;&lt;/P&gt;
&lt;BR /&gt;good luck&lt;BR /&gt;------------------------------&lt;BR /&gt;Susamay Halder Consultant&lt;BR /&gt;Consultant&lt;BR /&gt;Bruce Power&lt;BR /&gt;+1(437)217-1086&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Dec 2020 22:19:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Run-MAcro-How-to-give-the-file-path-dynamic-in-VBA-Code/m-p/55660#M9968</guid>
      <dc:creator>sonuiiml</dc:creator>
      <dc:date>2020-12-03T22:19:00Z</dc:date>
    </item>
    <item>
      <title>RE: Run MAcro - How to give the file path dynamic in VBA Code</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Run-MAcro-How-to-give-the-file-path-dynamic-in-VBA-Code/m-p/55661#M9969</link>
      <description>&lt;DIV class="uconBody"&gt;&lt;DIV style="page: WordSection1"&gt; &lt;P style="margin: 0cm;font-size: 11.0pt;font-family: &amp;quot;Calibri&amp;quot;,sans-serif;color: #17171E"&gt;&lt;SPAN style="color:windowtext"&gt;Thanks Susamy Halder.. Will try this logic&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="margin: 0cm;font-size: 11.0pt;font-family: &amp;quot;Calibri&amp;quot;,sans-serif;color: #17171E"&gt;&lt;SPAN style="color:windowtext"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="margin: 0cm;font-size: 11.0pt;font-family: &amp;quot;Calibri&amp;quot;,sans-serif;color: #17171E"&gt;&lt;SPAN style="color:windowtext"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="margin: 0cm;font-size: 11.0pt;font-family: &amp;quot;Calibri&amp;quot;,sans-serif;color: #17171E"&gt;&lt;SPAN style="color:windowtext"&gt;Janani PR&lt;/SPAN&gt;&lt;/P&gt; &lt;P style="margin: 0cm;font-size: 11.0pt;font-family: &amp;quot;Calibri&amp;quot;,sans-serif;color: #17171E"&gt;&lt;SPAN style="color:windowtext"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Dec 2020 12:42:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Run-MAcro-How-to-give-the-file-path-dynamic-in-VBA-Code/m-p/55661#M9969</guid>
      <dc:creator>JananiPR1</dc:creator>
      <dc:date>2020-12-04T12:42:00Z</dc:date>
    </item>
  </channel>
</rss>

