<?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 Advice in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891169#M1008367</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is the exact same reaction i had, get cell is giving me an exception. Do you think its a better idea to use the peek function? Can it be written to dynamically give different values? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 May 2015 19:57:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-05-06T19:57:55Z</dc:date>
    <item>
      <title>Macro Advice</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891164#M1008358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am writing a macro for the first time and having trouble with it, Please advice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Macro&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;&lt;STRONG&gt;Sub Test&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set mytext = ActiveDocument.GetSheetObject("A").GetCell(0,0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ActiveDocument.Variables("vTest").SetContent mytext.text, true&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set myvar = ActiveDocument.GetSheetObject("B").GetCell(vTest,0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ActiveDocument.Variables("Test").SetContent mytext2.text, true&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End Sub &lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to pull a value from sheet object A , store it in a variable vTest and then pass it as a parameter for pulling a value from Sheet object B. The macro above is what i have so far. Please advise,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can i use a &lt;STRONG&gt;set x = vTest &lt;/STRONG&gt; statement of some sort and create a temp variable and use that to get the value from Object B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know what i am trying to maybe easier with a peek function, but i want to be able to keep it dynamic as i have a huge access database linked to my application. Please advice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time and effort,&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Nik &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 18:24:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891164#M1008358</guid>
      <dc:creator />
      <dc:date>2015-05-06T18:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Advice</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891165#M1008360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A few minor fixes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub Test&lt;/P&gt;&lt;P&gt;set mytext = ActiveDocument.GetSheetObject("A").GetCell(1,0)&lt;BR /&gt;ActiveDocument.Variables("vTest").SetContent mytext.text, true&lt;BR /&gt; &lt;BR /&gt;&lt;STRONG&gt;vt=ActiveDocument.Variables("vTest").GetContent.string&lt;/STRONG&gt;&lt;BR /&gt;set &lt;STRONG&gt;mytext2&lt;/STRONG&gt; = ActiveDocument.GetSheetObject("B").GetCell(&lt;STRONG&gt;vt&lt;/STRONG&gt;,0)&lt;BR /&gt;ActiveDocument.Variables("Test").SetContent mytext2.text, true&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;End Sub &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 18:54:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891165#M1008360</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-06T18:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Advice</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891166#M1008361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Michael for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Nik &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 19:21:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891166#M1008361</guid>
      <dc:creator />
      <dc:date>2015-05-06T19:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Advice</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891167#M1008363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried the macro. It works but only upto a specific rowNo after which it gives me an error. Is there a limit on the number the variable can take? (for example: 347 returns an error), My column certainly does have more than 347 rows. Please advice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 19:49:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891167#M1008363</guid>
      <dc:creator />
      <dc:date>2015-05-06T19:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Advice</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891168#M1008365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Variable can take anything - number or text.&amp;nbsp; Wondering if GetCell() has any limits.&amp;nbsp; Which would be rather strange &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 19:55:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891168#M1008365</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-06T19:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Advice</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891169#M1008367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is the exact same reaction i had, get cell is giving me an exception. Do you think its a better idea to use the peek function? Can it be written to dynamically give different values? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 19:57:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891169#M1008367</guid>
      <dc:creator />
      <dc:date>2015-05-06T19:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Advice</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891170#M1008369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it is not about limit.&amp;nbsp; More likely the number you're getting from the object A points you to the row in the object B which doesn't exist.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 20:02:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891170#M1008369</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-06T20:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Advice</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891171#M1008370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will double check the total number of rows for object B. Thanks again. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 20:05:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891171#M1008370</guid>
      <dc:creator />
      <dc:date>2015-05-06T20:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Advice</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891172#M1008372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No Problem.&lt;/P&gt;&lt;P&gt;BTW, I just checked in my sample - it gives error with row 26 in A because it points to row 19 in B, but B has only 18 rows.&lt;/P&gt;&lt;P&gt;On the other hand, it works fine if I read row 1700 from A - it points to row 18 (or 17) in B.&lt;/P&gt;&lt;P&gt;So, it's not the limit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 20:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891172#M1008372</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-06T20:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Advice</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891173#M1008374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand now, What if i use something like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(GetSelectedCount(A)&amp;gt;0 , concat(Row No,&amp;nbsp; ','). will it give me the RowNo from B or just A?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 20:18:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891173#M1008374</guid>
      <dc:creator />
      <dc:date>2015-05-06T20:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Advice</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891174#M1008375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, it's not right.&amp;nbsp; I'm thinking that you can add a line&lt;/P&gt;&lt;P&gt;on error resume next&lt;/P&gt;&lt;P&gt;In this case there will be no error message.&amp;nbsp; But also there will be no a desired result, as if the macro didn't run.&lt;/P&gt;&lt;P&gt;A better way to handle it is to produce a message for user.&amp;nbsp; But I'm not fluent enough in VBScript to tell how exactly to implement this.&amp;nbsp; Maybe it makes sense for you to start a new discussion with this exact question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 20:27:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891174#M1008375</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-06T20:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Advice</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891175#M1008377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I Will have to think of a work around. Appreciate your time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Nik &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 20:30:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Advice/m-p/891175#M1008377</guid>
      <dc:creator />
      <dc:date>2015-05-06T20:30:13Z</dc:date>
    </item>
  </channel>
</rss>

