<?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 parse failed in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703685#M253808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think for now i will stick with thew macro just can find out how to convert &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;cell.text to double. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;i tried Cdbl(cell.text) but after that if anyway gives error type mismatch Cdbl. What is the method in qlikview macro with data conversions?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Sep 2014 12:03:53 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-26T12:03:53Z</dc:date>
    <item>
      <title>Macro parse failed</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703678#M253801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have a macro that runs on open document. When i open an original qvw on the server - the macro works fine it calculates everything what i need but if i put the file in production and open it as a user i get the error Macro parse failed functionality was lost. Type mismatch :String(see atached example). Any ideas why it is not working on a user side?&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub GetValues&lt;/P&gt;&lt;P&gt;Set TableBox = ActiveDocument.GetSheetObject("CH28")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dim sumA&lt;/P&gt;&lt;P&gt;dim CountA&lt;/P&gt;&lt;P&gt;idA=0&lt;/P&gt;&lt;P&gt;sumA=0&lt;/P&gt;&lt;P&gt;CountA=0&lt;/P&gt;&lt;P&gt;for RowIter = 1 to TableBox.GetRowCount-1&lt;/P&gt;&lt;P&gt;set cell = TableBox.GetCell(RowIter,2)&lt;/P&gt;&lt;P&gt;set cell7=TableBox.GetCell(RowIter,3)&lt;/P&gt;&lt;P&gt;if cell7.text="A" THEN&lt;/P&gt;&lt;P&gt;sumA=sumA+cell.text&lt;/P&gt;&lt;P&gt;CountA=CountA+1&lt;/P&gt;&lt;P&gt;idA="A"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vAsum")&lt;/P&gt;&lt;P&gt;v.SetContent sumA,true&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vAcount")&lt;/P&gt;&lt;P&gt;v.SetContent CountA,true&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vAid")&lt;/P&gt;&lt;P&gt;v.SetContent idA,true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dim sumB&lt;/P&gt;&lt;P&gt;dim CountB&lt;/P&gt;&lt;P&gt;sumB=0&lt;/P&gt;&lt;P&gt;CountB=0&lt;/P&gt;&lt;P&gt;for RowIter = 1 to TableBox.GetRowCount-1&lt;/P&gt;&lt;P&gt;set cell = TableBox.GetCell(RowIter,2)&lt;/P&gt;&lt;P&gt;set cell7=TableBox.GetCell(RowIter,3)&lt;/P&gt;&lt;P&gt;if cell7.text="B" THEN&lt;/P&gt;&lt;P&gt;sumB=sumB+cell.text&lt;/P&gt;&lt;P&gt;CountB=CountB+1&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vBsum")&lt;/P&gt;&lt;P&gt;v.SetContent sumB,true&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vBcount")&lt;/P&gt;&lt;P&gt;v.SetContent CountB,true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dim sumC&lt;/P&gt;&lt;P&gt;dim CountC&lt;/P&gt;&lt;P&gt;sumC=0&lt;/P&gt;&lt;P&gt;CountC=0&lt;/P&gt;&lt;P&gt;for RowIter = 1 to TableBox.GetRowCount-1&lt;/P&gt;&lt;P&gt;set cell = TableBox.GetCell(RowIter,2)&lt;/P&gt;&lt;P&gt;set cell7=TableBox.GetCell(RowIter,3)&lt;/P&gt;&lt;P&gt;if cell7.text="C" THEN&lt;/P&gt;&lt;P&gt;sumC=sumC+cell.text&lt;/P&gt;&lt;P&gt;CountC=CountC+1&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vCsum")&lt;/P&gt;&lt;P&gt;v.SetContent sumC,true&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vCcount")&lt;/P&gt;&lt;P&gt;v.SetContent CountC,true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 08:17:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703678#M253801</guid>
      <dc:creator />
      <dc:date>2014-09-26T08:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parse failed</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703679#M253802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It be worth you downloading VBSedit &lt;/P&gt;&lt;P&gt;This is what I am using to sort out my macro errors and you can debug in this too&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 08:49:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703679#M253802</guid>
      <dc:creator />
      <dc:date>2014-09-26T08:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parse failed</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703680#M253803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IT might be where you are doing&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sumC=0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;then &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sumC=sumC+cell.text&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;so you are trying to do maths with text, maybe try converting the text to integer or what ever the type of number you are expecting&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 09:05:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703680#M253803</guid>
      <dc:creator />
      <dc:date>2014-09-26T09:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parse failed</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703681#M253804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But it is very strange why it is working when opening in the server and why it is not working for user&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 10:30:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703681#M253804</guid>
      <dc:creator />
      <dc:date>2014-09-26T10:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parse failed</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703682#M253805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want calculate the count and sum from a certain field which have a condition on another field? This could be done directly in gui and needed none macro, maybe like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if(field1 = 'A', field2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your parse-error could be caused through not numeric values in your tablebox which could occurred if you have different selctions or different datasets through section access. For this you need an additionally check with isnum().&lt;/P&gt;&lt;P&gt;Apart from that you could comment out parts from your routine and/or put a msgbox with a counter and your values to find the error-point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 10:31:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703682#M253805</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-09-26T10:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parse failed</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703683#M253806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't calculate it via gui because i need to get values from chart(straight table) into text object. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 11:16:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703683#M253806</guid>
      <dc:creator />
      <dc:date>2014-09-26T11:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parse failed</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703684#M253807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Most often you could calculate values in a textbox as well as in a table-chart. Maybe you need a little more complex expression with aggr().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/03/07/aggr" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/03/07/aggr"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/03/07/aggr&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 11:25:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703684#M253807</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-09-26T11:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parse failed</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703685#M253808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think for now i will stick with thew macro just can find out how to convert &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;cell.text to double. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;i tried Cdbl(cell.text) but after that if anyway gives error type mismatch Cdbl. What is the method in qlikview macro with data conversions?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 12:03:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703685#M253808</guid>
      <dc:creator />
      <dc:date>2014-09-26T12:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parse failed</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703686#M253809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need something like this:&lt;/P&gt;&lt;P&gt;if isnum(value) then v1 + v2 'else nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of convert with cdbl or cint - then they will fail by strings and maybe null, too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 12:19:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703686#M253809</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-09-26T12:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parse failed</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703687#M253810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;aggr function anyway wont let me to manipulate sheet objects when writing a formula. I will not be able to pick a calculated value from table.&lt;/P&gt;&lt;P&gt;I managed to fix the code. it is simply not cell.text but cell.number&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 12:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703687#M253810</guid>
      <dc:creator />
      <dc:date>2014-09-26T12:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Macro parse failed</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703688#M253811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vaishali&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you say downloading VBSedit, what is that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2014 17:11:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-parse-failed/m-p/703688#M253811</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-07T17:11:27Z</dc:date>
    </item>
  </channel>
</rss>

