<?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 Macro only runs once.... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-only-runs-once/m-p/306483#M113164</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Beautiful. I just converted my script to a sub and all is well.&amp;nbsp; Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jan 2012 15:20:36 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-01-25T15:20:36Z</dc:date>
    <item>
      <title>Macro only runs once....</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-only-runs-once/m-p/306481#M113162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bear with me here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a button that is enabled when the count on a primary key is 1.&amp;nbsp; I've built a 'Run Macro' action to generate an email containing the data associated with the selected primary key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I'm in the Edit Module window I can press 'Test' repeatedly and the emails will fire successfully.&amp;nbsp; When I press the button the email will fire successfully...ONCE.&amp;nbsp; After pressing the button all subsequent attempts to fire an email from within the Edit Module window or via the button fail.&amp;nbsp; I don't get any error messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When no emails are firing, if I modify the script (even by just adding a space) the Test button will once again fire emails repeatedly and the button will work ONCE.&amp;nbsp; Again, all subsequent attempts fail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone point me in the right direction here?&amp;nbsp; Why does the button only work one time then completely disable the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Mick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 15:05:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-only-runs-once/m-p/306481#M113162</guid>
      <dc:creator />
      <dc:date>2012-01-25T15:05:22Z</dc:date>
    </item>
    <item>
      <title>Macro only runs once....</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-only-runs-once/m-p/306482#M113163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you make changes to the doc, VBS variables in the module are reinitialized. It sounds like you may be using some gobal variables (defined outside a sub) that are relying on that initaliztion. So perhaps your macro leaves them in a non-reusable state. If that't the case, look to reinitializing them on each call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 15:15:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-only-runs-once/m-p/306482#M113163</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2012-01-25T15:15:02Z</dc:date>
    </item>
    <item>
      <title>Macro only runs once....</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-only-runs-once/m-p/306483#M113164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Beautiful. I just converted my script to a sub and all is well.&amp;nbsp; Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 15:20:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-only-runs-once/m-p/306483#M113164</guid>
      <dc:creator />
      <dc:date>2012-01-25T15:20:36Z</dc:date>
    </item>
  </channel>
</rss>

