<?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 Selecting ListBox/Table Cells Via Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Selecting-ListBox-Table-Cells-Via-Macro/m-p/195246#M55836</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand that &lt;I&gt;fields&lt;/I&gt; can be selected via macros using something like:&lt;/P&gt;&lt;P&gt;ActiveDocument.Fields("Year").Select '.....'&lt;/P&gt;&lt;P&gt;But what if I need to select an item or a number of items in a listbox which is based on an expression rather than a field? Or alternatively select a cell or range of cells in a table object?&lt;/P&gt;&lt;P&gt;I am experimenting with code similar to the following:&lt;/P&gt;&lt;P&gt;Set oLB_Cat = ActiveDocument.GetSheetObject("CAT")&lt;BR /&gt;Set oCell = oLB_Cat.GetCell(1,0)&lt;BR /&gt;oCell.State = 1&lt;/P&gt;&lt;P&gt;But it does not seem to have any effect. Is this the right approach or is there another method?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jun 2010 11:30:53 GMT</pubDate>
    <dc:creator>chrisbrain</dc:creator>
    <dc:date>2010-06-21T11:30:53Z</dc:date>
    <item>
      <title>Selecting ListBox/Table Cells Via Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-ListBox-Table-Cells-Via-Macro/m-p/195246#M55836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand that &lt;I&gt;fields&lt;/I&gt; can be selected via macros using something like:&lt;/P&gt;&lt;P&gt;ActiveDocument.Fields("Year").Select '.....'&lt;/P&gt;&lt;P&gt;But what if I need to select an item or a number of items in a listbox which is based on an expression rather than a field? Or alternatively select a cell or range of cells in a table object?&lt;/P&gt;&lt;P&gt;I am experimenting with code similar to the following:&lt;/P&gt;&lt;P&gt;Set oLB_Cat = ActiveDocument.GetSheetObject("CAT")&lt;BR /&gt;Set oCell = oLB_Cat.GetCell(1,0)&lt;BR /&gt;oCell.State = 1&lt;/P&gt;&lt;P&gt;But it does not seem to have any effect. Is this the right approach or is there another method?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 11:30:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-ListBox-Table-Cells-Via-Macro/m-p/195246#M55836</guid>
      <dc:creator>chrisbrain</dc:creator>
      <dc:date>2010-06-21T11:30:53Z</dc:date>
    </item>
    <item>
      <title>Selecting ListBox/Table Cells Via Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-ListBox-Table-Cells-Via-Macro/m-p/195247#M55837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Following should work in your macro. It will look for range of valeus between two values and select it for the field&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;'''set variable with values&lt;BR /&gt; set vVarStart=ActiveDocument.Variables("vStart")&lt;BR /&gt; set vVarEnd=ActiveDocument.Variables("vEnd")&lt;BR /&gt;''get you expression in the variable.&lt;BR /&gt; vStartSearch= vVarStar.GetContent.String&lt;BR /&gt; vEndSearch=vVarEnd.GetContent.String&lt;BR /&gt;&lt;BR /&gt; '''Search values of your variable&lt;BR /&gt;&lt;BR /&gt; vSearch = "=IF( [YourField] &amp;gt;= '" &amp;amp; vStartSearch &amp;amp; "' AND [YourField] &amp;lt;= '" &amp;amp; vEndSearch &amp;amp; "',True(),False())"&lt;BR /&gt; ActiveDocument.Fields("YourField").Select vSearch&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 17:16:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-ListBox-Table-Cells-Via-Macro/m-p/195247#M55837</guid>
      <dc:creator />
      <dc:date>2010-06-21T17:16:38Z</dc:date>
    </item>
  </channel>
</rss>

