<?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: Loop Field Macro not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613346#M683316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great - glad to help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact, yes. Here is the link to the post with the PPT extract utility. Haven't reviewed it in a while so it may need some tailoring to meet your specific needs.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-3774"&gt;http://community.qlik.com/docs/DOC-3774&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that you'll need to add a step that allows you to walk through the sheets at a minimum as originally I set it up to work all the objects from one sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is a little script that I used to set all the sheets' tab color and background in production apps to maintain consistency. It illustrates how to move through the sheets in the app using a for-next loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB dynTabColor&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; FOR i = 0 to activedocument.noofsheets - 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; sheetid = activedocument.getlayout.activesheetid&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET mysheet=activedocument.activesheet&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET sp=mysheet.getproperties&lt;/P&gt;&lt;P&gt;&amp;nbsp; sp.tabattr.bgcolor.primarycol.iscalculated = TRUE&lt;/P&gt;&lt;P&gt;&amp;nbsp; sp.tabattr.bgcolor.primarycol.colorexpr.v = "if(GetActiveSheetId() like '*"&amp;amp;sheetid&amp;amp;"' ,white(),rgb(57,103,139))"&lt;/P&gt;&lt;P&gt;&amp;nbsp; sp.tabattr.fgcolor.primarycol.iscalculated = TRUE&lt;/P&gt;&lt;P&gt;&amp;nbsp; sp.tabattr.fgcolor.primarycol.colorexpr.v = "if(GetActiveSheetId() like '*"&amp;amp;sheetid&amp;amp;"' ,rgb(0,71,125),white())"&lt;/P&gt;&lt;P&gt;&amp;nbsp; sp.tabattr.mode = 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; mysheet.setproperties sp&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; activedocument.nexttab&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; NEXT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;END SUB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you post another discussion regarding the ppt tool and I'll see if I can help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Feb 2014 16:05:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-02-24T16:05:42Z</dc:date>
    <item>
      <title>Loop Field Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613341#M683303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using Autopilot's macro in my application to loop field.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-4416"&gt;VB Macro to Loop Field (Dynamic) and Export Chart (Dynamic) to Excel &amp;amp;amp; Name Sheets by Field Value&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have followed all neccesary steps but it's not working. Attached sample application with the macro. Here i want to loop the field "Path (Sales Reps)" so i set the field Path (Sales Reps) as my vfname and also the chart id= CH36.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 12:53:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613341#M683303</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-20T12:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Field Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613342#M683305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, here are a few things that I noticed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The variable vfname must be set to a field name that exists in the application. You had it set to path which was not a field in the qv app. Try something like Year or Month&lt;/P&gt;&lt;P&gt;2. The module security settings must be set to "Sytem Access" and "Allow System Access" in the dropdowns above the OK button in the edit module dialog. You had it set to the default which is Safe Mode.&lt;/P&gt;&lt;P&gt;3. Even with the above being set correctly, I ran into an unexplained error in the macro if I only selected only value in the field set as vfname. For example, if I set vfname to Month and selected one value in that field, say 'Jan', and ran the macro it has an error when attempting to delete the extra (blank) worksheets in the excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only immediate resolution is ensure that at least 2 values are selected in whatever field that vfname is set to. In that case, it does perform as expected without errors. When I designed it, I intended it to be used for successive (looping) exports to excel. That said, I don't think that it shouldn't be capable as well of performing a single value export.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll continue to test the script to find a working solution. But for now, you can either comment out the script that deletes the extra sheets or select multiple values for export.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll let you know when I find the resolution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 14:40:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613342#M683305</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-20T14:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Field Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613343#M683307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think i set the 1st 2 item correctly.&lt;/P&gt;&lt;P&gt;"Path" is exist in the application.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-02-21 15_34_22-List Box Properties [Sales Reps] - 7 linked objects.png" class="jive-image" src="/legacyfs/online/53612_2014-02-21 15_34_22-List Box Properties [Sales Reps] - 7 linked objects.png" style="width: 620px; height: 524px;" /&gt;&lt;/P&gt;&lt;P&gt;I'm waiting for your reply&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Feb 2014 11:32:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613343#M683307</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-21T11:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Loop Field Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613344#M683310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks - overlooked the "Path" field but the security was not set correct when I opened the demo app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Okay - I've got a solution!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue was the portion of script trying to cleanup the extra worksheets. If you tried to run it with one value selected, then it would lose track of how many worksheets existed and then reference ones that did not exist anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the revised script. I'll post the revision in the main document as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Feb 2014 18:23:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613344#M683310</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-21T18:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Field Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613345#M683313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much. Your script works like a charm. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/love.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, although this seem like out of the topic but do you have any macro script which would allow me to export all the tabs in the application to ppt in different slides?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got this from community but it will only export the active sheet and also the image got truncated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub exportppt&lt;/P&gt;&lt;P&gt;Set objPPT = CreateObject("PowerPoint.Application")&lt;/P&gt;&lt;P&gt;objPPT.Visible = True&lt;/P&gt;&lt;P&gt;Set objPresentation = objPPT.Presentations.Add&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set PPSlide = objPresentation.Slides.Add(1,11)&lt;/P&gt;&lt;P&gt;ActiveDocument.ActiveSheet.CopyBitmapToClipboard&lt;/P&gt;&lt;P&gt;PPSlide.Shapes.Paste&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set PPSlide = Nothing&lt;/P&gt;&lt;P&gt;Set PPPres = Nothing&lt;/P&gt;&lt;P&gt;Set PPApp = Nothing&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>Sat, 22 Feb 2014 15:35:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613345#M683313</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-22T15:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Field Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613346#M683316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great - glad to help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact, yes. Here is the link to the post with the PPT extract utility. Haven't reviewed it in a while so it may need some tailoring to meet your specific needs.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-3774"&gt;http://community.qlik.com/docs/DOC-3774&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that you'll need to add a step that allows you to walk through the sheets at a minimum as originally I set it up to work all the objects from one sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is a little script that I used to set all the sheets' tab color and background in production apps to maintain consistency. It illustrates how to move through the sheets in the app using a for-next loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB dynTabColor&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; FOR i = 0 to activedocument.noofsheets - 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; sheetid = activedocument.getlayout.activesheetid&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET mysheet=activedocument.activesheet&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET sp=mysheet.getproperties&lt;/P&gt;&lt;P&gt;&amp;nbsp; sp.tabattr.bgcolor.primarycol.iscalculated = TRUE&lt;/P&gt;&lt;P&gt;&amp;nbsp; sp.tabattr.bgcolor.primarycol.colorexpr.v = "if(GetActiveSheetId() like '*"&amp;amp;sheetid&amp;amp;"' ,white(),rgb(57,103,139))"&lt;/P&gt;&lt;P&gt;&amp;nbsp; sp.tabattr.fgcolor.primarycol.iscalculated = TRUE&lt;/P&gt;&lt;P&gt;&amp;nbsp; sp.tabattr.fgcolor.primarycol.colorexpr.v = "if(GetActiveSheetId() like '*"&amp;amp;sheetid&amp;amp;"' ,rgb(0,71,125),white())"&lt;/P&gt;&lt;P&gt;&amp;nbsp; sp.tabattr.mode = 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; mysheet.setproperties sp&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; activedocument.nexttab&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; NEXT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;END SUB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you post another discussion regarding the ppt tool and I'll see if I can help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 16:05:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613346#M683316</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-24T16:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Field Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613347#M683318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Honestly&amp;nbsp; i got no idea how to modify your script to fulfill my needs, it's even too me quite a while to understand QlikView scripting as well.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I post another discussion here, please have a look, hope you can help.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/478208"&gt;Export all sheets to ppt&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 03:11:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613347#M683318</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-28T03:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Field Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613348#M683320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I replied to your post...the macro should allow you to copy an image to a ppt slide for each sheet in the qv app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 14:16:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613348#M683320</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-03T14:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Loop Field Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613349#M683322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Autopilot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your macro is working for me to loop field and export. But i also want to have a 'TOTAL' sheet.&lt;/P&gt;&lt;P&gt;Let say i want loop my country field: Country A, Country B and Country C, so the TOTAL is sum of Country A, Country B and Country C. Please see my attachment. Hope you can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 01:50:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-Field-Macro-not-working/m-p/613349#M683322</guid>
      <dc:creator />
      <dc:date>2014-03-17T01:50:26Z</dc:date>
    </item>
  </channel>
</rss>

