<?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 Current Selection and Run Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-Selection-and-Run-Macro/m-p/198297#M57648</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two challenges that I have been trying all night to overcome. I'm hoping the collective wisdom of the forum can help me break-through these issues.&lt;/P&gt;&lt;P&gt;First, I cannot figure out how to execute a VB sub that takes parameters from the Run Macro action. Without parameters, it is easy. But if the sub has one or more parameters, no amount of trial-and-error can get it to work and I couldn't find a single example in the user reference guide.&lt;/P&gt;&lt;P&gt;Second, I'm trying to use a macro to capture the current selection state of a given field, store it and clear it upon entering a sheet, then restore the value upon exiting that sheet. I almost had it working using a combo of ActiveDocument.Fields("x").GetSelectedValues and ActiveDocument.Fields("x").SelectValues. However, it only works when the user specifically selects values. If instead they use the search (*xyz*) function to select values, then my solution doesn't work.&lt;/P&gt;&lt;P&gt;Is there any way to ask what is the selection criteria for a given field, store it in a variable, then later select that same criteria. It needs to work regardless of how many values are selected (within reason) or whether they select values or use a search string.&lt;/P&gt;&lt;P&gt;I happily await your wisdom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jun 2010 07:22:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-06-23T07:22:58Z</dc:date>
    <item>
      <title>Current Selection and Run Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Selection-and-Run-Macro/m-p/198297#M57648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two challenges that I have been trying all night to overcome. I'm hoping the collective wisdom of the forum can help me break-through these issues.&lt;/P&gt;&lt;P&gt;First, I cannot figure out how to execute a VB sub that takes parameters from the Run Macro action. Without parameters, it is easy. But if the sub has one or more parameters, no amount of trial-and-error can get it to work and I couldn't find a single example in the user reference guide.&lt;/P&gt;&lt;P&gt;Second, I'm trying to use a macro to capture the current selection state of a given field, store it and clear it upon entering a sheet, then restore the value upon exiting that sheet. I almost had it working using a combo of ActiveDocument.Fields("x").GetSelectedValues and ActiveDocument.Fields("x").SelectValues. However, it only works when the user specifically selects values. If instead they use the search (*xyz*) function to select values, then my solution doesn't work.&lt;/P&gt;&lt;P&gt;Is there any way to ask what is the selection criteria for a given field, store it in a variable, then later select that same criteria. It needs to work regardless of how many values are selected (within reason) or whether they select values or use a search string.&lt;/P&gt;&lt;P&gt;I happily await your wisdom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jun 2010 07:22:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Selection-and-Run-Macro/m-p/198297#M57648</guid>
      <dc:creator />
      <dc:date>2010-06-23T07:22:58Z</dc:date>
    </item>
    <item>
      <title>AW:Current Selection and Run Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Selection-and-Run-Macro/m-p/198298#M57649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For item 1, could you perhaps give an example, don't quite get you.&lt;/P&gt;&lt;P&gt;For item 2, can't you use (additive) bookmarks?&lt;/P&gt;&lt;P&gt;Rgds,&lt;BR /&gt;Joachim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jun 2010 07:49:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Selection-and-Run-Macro/m-p/198298#M57649</guid>
      <dc:creator>biester</dc:creator>
      <dc:date>2010-06-23T07:49:37Z</dc:date>
    </item>
  </channel>
</rss>

