<?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 works the first time? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-only-works-the-first-time/m-p/328071#M707550</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a macro that is only working the first time it is executed with a button.&amp;nbsp; It also works when I push the test button from the Edit Module box.&amp;nbsp; This is getting a bit frustrating. Any thoughts???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requested Module Security is Safe Only&lt;/P&gt;&lt;P&gt;Current Local Security is Safe Mode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the code but I don't think its the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sub RestoreMainCharts() &lt;BR /&gt;&lt;BR /&gt;' Temporarily turn off the AutoMinimize so that we can &lt;BR /&gt;' put 2 charts on the front panel without them auto-minimizing&lt;BR /&gt;' themselves.&lt;BR /&gt;SetAutoMinimize "CH74", false &lt;BR /&gt;SetAutoMinimize "CH75", false&lt;BR /&gt;&lt;BR /&gt;ActiveDocument.GetSheetObject("CH74").Restore&lt;BR /&gt;ActiveDocument.GetSheetObject("CH75").Restore&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SetAutoMinimize "CH74", true&lt;BR /&gt;SetAutoMinimize "CH75", true&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;' Minimize all the chart objects.&lt;BR /&gt;ActiveDocument.GetSheetObject("CH67").Minimize&lt;BR /&gt;ActiveDocument.GetSheetObject("CH68").Minimize&lt;BR /&gt;ActiveDocument.GetSheetObject("CH69").Minimize&lt;BR /&gt;ActiveDocument.GetSheetObject("CH70").Minimize&lt;BR /&gt;ActiveDocument.GetSheetObject("CH72").Minimize&lt;BR /&gt;ActiveDocument.GetSheetObject("CH73").Minimize&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;BR /&gt;Sub SetAutoMinimize(chart, state) &lt;BR /&gt;rem ** Set auto-minimize flag for a chart **&lt;BR /&gt;set g = ActiveDocument.GetSheetObject(chart)&lt;BR /&gt;set gp = g.GetProperties&lt;BR /&gt;gp.GraphLayout.Frame.AutoMinimize = state&lt;BR /&gt;g.SetProperties gp&lt;BR /&gt;&lt;BR /&gt;End sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks--&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Nov 2011 23:10:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-11-17T23:10:04Z</dc:date>
    <item>
      <title>Macro only works the first time?</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-only-works-the-first-time/m-p/328071#M707550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a macro that is only working the first time it is executed with a button.&amp;nbsp; It also works when I push the test button from the Edit Module box.&amp;nbsp; This is getting a bit frustrating. Any thoughts???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requested Module Security is Safe Only&lt;/P&gt;&lt;P&gt;Current Local Security is Safe Mode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the code but I don't think its the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sub RestoreMainCharts() &lt;BR /&gt;&lt;BR /&gt;' Temporarily turn off the AutoMinimize so that we can &lt;BR /&gt;' put 2 charts on the front panel without them auto-minimizing&lt;BR /&gt;' themselves.&lt;BR /&gt;SetAutoMinimize "CH74", false &lt;BR /&gt;SetAutoMinimize "CH75", false&lt;BR /&gt;&lt;BR /&gt;ActiveDocument.GetSheetObject("CH74").Restore&lt;BR /&gt;ActiveDocument.GetSheetObject("CH75").Restore&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SetAutoMinimize "CH74", true&lt;BR /&gt;SetAutoMinimize "CH75", true&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;' Minimize all the chart objects.&lt;BR /&gt;ActiveDocument.GetSheetObject("CH67").Minimize&lt;BR /&gt;ActiveDocument.GetSheetObject("CH68").Minimize&lt;BR /&gt;ActiveDocument.GetSheetObject("CH69").Minimize&lt;BR /&gt;ActiveDocument.GetSheetObject("CH70").Minimize&lt;BR /&gt;ActiveDocument.GetSheetObject("CH72").Minimize&lt;BR /&gt;ActiveDocument.GetSheetObject("CH73").Minimize&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;BR /&gt;Sub SetAutoMinimize(chart, state) &lt;BR /&gt;rem ** Set auto-minimize flag for a chart **&lt;BR /&gt;set g = ActiveDocument.GetSheetObject(chart)&lt;BR /&gt;set gp = g.GetProperties&lt;BR /&gt;gp.GraphLayout.Frame.AutoMinimize = state&lt;BR /&gt;g.SetProperties gp&lt;BR /&gt;&lt;BR /&gt;End sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks--&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 23:10:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-only-works-the-first-time/m-p/328071#M707550</guid>
      <dc:creator />
      <dc:date>2011-11-17T23:10:04Z</dc:date>
    </item>
    <item>
      <title>Macro only works the first time?</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-only-works-the-first-time/m-p/328072#M707551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it appears to be something with the button.&amp;nbsp; I deleted all the other actions except Run Macro and it Works.&amp;nbsp; I think I just need to inclued the code for the other actions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 23:28:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-only-works-the-first-time/m-p/328072#M707551</guid>
      <dc:creator />
      <dc:date>2011-11-17T23:28:36Z</dc:date>
    </item>
  </channel>
</rss>

