<?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 use of a variable in a Select vb script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/use-of-a-variable-in-a-Select-vb-script/m-p/149475#M27646</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 created a variable vMaxWeek containing the last week loaded, i want to create a vb script (macro) which is putting a slection of the field week based on the content of the vMaxWeek.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like: activedocument.Fields("Week").Select "$(vMaxWeek)&lt;/P&gt;&lt;P&gt;But this is not working, has anyone an idea how to work with the content of a variable in VB?&lt;/P&gt;&lt;P&gt;I also tried to use the getvariable but without succes.&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;P&gt;Kind regards,&lt;BR /&gt;Linda Monincx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jul 2009 15:52:21 GMT</pubDate>
    <dc:creator>lmonincx</dc:creator>
    <dc:date>2009-07-16T15:52:21Z</dc:date>
    <item>
      <title>use of a variable in a Select vb script</title>
      <link>https://community.qlik.com/t5/QlikView/use-of-a-variable-in-a-Select-vb-script/m-p/149475#M27646</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 created a variable vMaxWeek containing the last week loaded, i want to create a vb script (macro) which is putting a slection of the field week based on the content of the vMaxWeek.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like: activedocument.Fields("Week").Select "$(vMaxWeek)&lt;/P&gt;&lt;P&gt;But this is not working, has anyone an idea how to work with the content of a variable in VB?&lt;/P&gt;&lt;P&gt;I also tried to use the getvariable but without succes.&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;P&gt;Kind regards,&lt;BR /&gt;Linda Monincx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 15:52:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-of-a-variable-in-a-Select-vb-script/m-p/149475#M27646</guid>
      <dc:creator>lmonincx</dc:creator>
      <dc:date>2009-07-16T15:52:21Z</dc:date>
    </item>
    <item>
      <title>use of a variable in a Select vb script</title>
      <link>https://community.qlik.com/t5/QlikView/use-of-a-variable-in-a-Select-vb-script/m-p/149476#M27647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Linda,&lt;/P&gt;&lt;P&gt;You can do it like this:&lt;/P&gt;&lt;P&gt;sub test&lt;BR /&gt;set v = ActiveDocument.Variables("vTest")&lt;BR /&gt;ActiveDocument.Fields("F1").Select v.GetContent.String&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;This assumes that you have a variable called vTest and you want to select the matching value from a field called F1.&lt;/P&gt;&lt;P&gt;However, in QlikView 9 there's no need to use a macro for this. Instead this can be achieved with a simple action trigger.&lt;/P&gt;&lt;P&gt;1. Create a button&lt;/P&gt;&lt;P&gt;2. Assign the "Select in Field" action. Point the Field to F1 and the Search string to =$(vTest), and you should get the same result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 16:19:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-of-a-variable-in-a-Select-vb-script/m-p/149476#M27647</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-16T16:19:24Z</dc:date>
    </item>
    <item>
      <title>use of a variable in a Select vb script</title>
      <link>https://community.qlik.com/t5/QlikView/use-of-a-variable-in-a-Select-vb-script/m-p/149477#M27648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great that works thanks for the help! &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 16:40:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-of-a-variable-in-a-Select-vb-script/m-p/149477#M27648</guid>
      <dc:creator>lmonincx</dc:creator>
      <dc:date>2009-07-16T16:40:50Z</dc:date>
    </item>
  </channel>
</rss>

