<?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: Macro stopped working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-stopped-working/m-p/1324541#M615409</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pls try recreating it new with the sample app&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Jul 2017 16:45:08 GMT</pubDate>
    <dc:creator>tajmohamed30</dc:creator>
    <dc:date>2017-07-04T16:45:08Z</dc:date>
    <item>
      <title>Macro stopped working</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-stopped-working/m-p/1324540#M615408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have snatched this loop macro out on the great www.&amp;nbsp;&amp;nbsp; and combined it with an export macro.&amp;nbsp; I have created a button with the run macro command.&amp;nbsp; Last month when I created this it worked perfectly.. Now suddenly i can't make it execute.&amp;nbsp;&amp;nbsp; If i run the export macro on it's own. it's working fine.&amp;nbsp; so it must be the loop which is of somehow.&amp;nbsp;&amp;nbsp; But have can it's suddenly stop working?&amp;nbsp; ( i have checked that allow system access is granted).&amp;nbsp; Are there other places where you by mistake can disable the security in qlik, so it dosn't work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The loop looks in the table i'm loading seperatly. i have made a listbox of all the values in it. it then selects the first. export, select next export etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is wrong.&amp;nbsp; the code or some kind of security..&amp;nbsp; I'm almost 100% sure no one has altered the code. i have tried copying from new.&amp;nbsp; Checking the spelling of the macro name, the field name etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub Loops&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MaxRow =&amp;nbsp; ActiveDocument.Variables("vNoofrows").GetContent.Value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For x = 0 to MaxRow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set mySelections = ActiveDocument.fields("Selection").GetSelectedValues(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.Fields("Selection").Clear&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if mySelections.Count = 0 then&lt;/P&gt;&lt;P&gt;&amp;nbsp; set val=ActiveDocument.Fields("Selection").GetPossibleValues(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ValueToSelect = val.Item(0).Text&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;set val=ActiveDocument.Fields("Selection").GetPossibleValues&lt;/P&gt;&lt;P&gt;IamDone = " "&lt;/P&gt;&lt;P&gt;for i=0 to val.Count-1&lt;/P&gt;&lt;P&gt;ValueToSelect = val.Item(i).Text&lt;/P&gt;&lt;P&gt;if IamDone = "X" then&lt;/P&gt;&lt;P&gt;exit for&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if val.Item(i).Text = mySelections.Item(0).text then&lt;/P&gt;&lt;P&gt;IamDone = "X"&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Call exportToExcel_Variant2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end if&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ActiveDocument.Fields("Selection").Select ValueToSelect&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call exportToExcel_Variant2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jul 2017 11:58:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-stopped-working/m-p/1324540#M615408</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-04T11:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Macro stopped working</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-stopped-working/m-p/1324541#M615409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pls try recreating it new with the sample app&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jul 2017 16:45:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-stopped-working/m-p/1324541#M615409</guid>
      <dc:creator>tajmohamed30</dc:creator>
      <dc:date>2017-07-04T16:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Macro stopped working</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-stopped-working/m-p/1324542#M615410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nice and scrampled sample now attached&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jul 2017 07:09:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-stopped-working/m-p/1324542#M615410</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-05T07:09:16Z</dc:date>
    </item>
  </channel>
</rss>

