<?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 Error in macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-in-macro/m-p/315425#M1196715</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is sv declared as a global VB variable? From what you posted, it will be set in StocksActivate but not available to StocksDeactivate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Mar 2011 21:28:23 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2011-03-22T21:28:23Z</dc:date>
    <item>
      <title>Error in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-macro/m-p/315424#M1196714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;sub StocksActivate&lt;BR /&gt; set f=ActiveDocument.Fields("inv")&lt;BR /&gt; set sv=f.GetSelectedValues&lt;BR /&gt; f.Select "(25|30|43)"&lt;BR /&gt;end sub&lt;BR /&gt;&lt;BR /&gt;sub StocksDeactivate&lt;BR /&gt; set f=ActiveDocument.Fields("inv")&lt;BR /&gt; f.SelectValues sv&lt;BR /&gt;end sub&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I create two subs for Page Triggers (first to Activate, second to Deactivate trigger). Main idea was to store current selection before activating page to sv variable, and restore it after deactivation. In sub Deactivate a get an error - "Type mismatch: 'f.SelectValues'"&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2011 09:29:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-macro/m-p/315424#M1196714</guid>
      <dc:creator />
      <dc:date>2011-03-22T09:29:36Z</dc:date>
    </item>
    <item>
      <title>Error in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-macro/m-p/315425#M1196715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is sv declared as a global VB variable? From what you posted, it will be set in StocksActivate but not available to StocksDeactivate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2011 21:28:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-macro/m-p/315425#M1196715</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2011-03-22T21:28:23Z</dc:date>
    </item>
    <item>
      <title>Error in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-macro/m-p/315426#M1196716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can add the following code to your macro to access the content of a variable in the qv document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;rem ** Get setting of variable **&lt;BR /&gt;set vT = ActiveDocument.GetVariable("vTest")&lt;BR /&gt;rem ** Get value of variable **&lt;BR /&gt;SelValue = vT.GetContent.String&lt;BR /&gt;rem ** Select data **&lt;BR /&gt;ActiveDocument.Fields("inv").Select SelValue&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2011 23:10:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-macro/m-p/315426#M1196716</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-22T23:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-macro/m-p/315427#M1196717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I really appreciate the tip.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For days trying how to read varaibles within a macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 21:47:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-macro/m-p/315427#M1196717</guid>
      <dc:creator />
      <dc:date>2013-10-02T21:47:23Z</dc:date>
    </item>
  </channel>
</rss>

