<?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 EXCEL VBO: Can we add parameters to the &amp;quot;Run macro&amp;quot; action? in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/EXCEL-VBO-Can-we-add-parameters-to-the-quot-Run-macro-quot/m-p/64062#M16893</link>
    <description />
    <pubDate>Wed, 01 Mar 2017 20:02:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-03-01T20:02:00Z</dc:date>
    <item>
      <title>EXCEL VBO: Can we add parameters to the "Run macro" action?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/EXCEL-VBO-Can-we-add-parameters-to-the-quot-Run-macro-quot/m-p/64062#M16893</link>
      <description />
      <pubDate>Wed, 01 Mar 2017 20:02:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/EXCEL-VBO-Can-we-add-parameters-to-the-quot-Run-macro-quot/m-p/64062#M16893</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-01T20:02:00Z</dc:date>
    </item>
    <item>
      <title>Hi There,</title>
      <link>https://community.blueprism.com/t5/Product-Forum/EXCEL-VBO-Can-we-add-parameters-to-the-quot-Run-macro-quot/m-p/64063#M16894</link>
      <description>Hi There,
I am not sure if this helps.
You can create a new action to run the macro. Copy the same code as the original and update with the below.
GetInstance(Handle).Run(Macro_Name, Parms1, Parms2, Parms3)
Make sure you have Parms1, Parms2, Parms3 as inputs with data variables assigned.
Please let us know if this worked</description>
      <pubDate>Thu, 08 Jun 2017 20:20:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/EXCEL-VBO-Can-we-add-parameters-to-the-quot-Run-macro-quot/m-p/64063#M16894</guid>
      <dc:creator>hari.murali</dc:creator>
      <dc:date>2017-06-08T20:20:00Z</dc:date>
    </item>
    <item>
      <title>I can confirm the above.</title>
      <link>https://community.blueprism.com/t5/Product-Forum/EXCEL-VBO-Can-we-add-parameters-to-the-quot-Run-macro-quot/m-p/64064#M16895</link>
      <description>I can confirm the above.
I created a new Macro function in my Excel workbook with the following code..
_____
Sub SelectCellReferenceOfValue(PlaceholderName As String)
    Dim ra As Range
    Set ra = Cells.Find(What:=PlaceholderName, LookIn:=xlFormulas, LookAt _
        :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
        False, SearchFormat:=False)
    If ra Is Nothing Then
        MsgBox (""Not found"")
        Else
        ActiveSheet.Range(ra.Address).Select
    End If
End Sub
_______
Then added a code stage in my Excel VBO with the following Code snippet
_______
GetInstance(Handle).Run(Macro_Name, Placeholder)
_______
Where `Macro_Name` is ""SelectCellReferenceOfValue"" and `Placeholder` is the String data item value I'm searching for on the sheet.</description>
      <pubDate>Tue, 13 Jun 2017 14:00:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/EXCEL-VBO-Can-we-add-parameters-to-the-quot-Run-macro-quot/m-p/64064#M16895</guid>
      <dc:creator>sarcher</dc:creator>
      <dc:date>2017-06-13T14:00:00Z</dc:date>
    </item>
  </channel>
</rss>

