<?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 Macro Help - Set a Cell Value with Variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-Help-Set-a-Cell-Value-with-Variable/m-p/745731#M667284</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to set a cell in a straight table with a value from a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but my code isn't setting the cell with the value from the variable, instead its deleting the value from the variable. i think its getting the cell value (null) and setting the variable to it (null)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rather than doing what i want which is to get the value from the variable and setting it to the cell!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub GetTotal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set ch = ActiveDocument.GetSheetObject("CH01").GetCell(1,5)&amp;nbsp; 'empty cell to populate&lt;/P&gt;&lt;P&gt;set vVar = ActiveDocument.Variables("vMyVariable") 'my variable that stores the value&lt;/P&gt;&lt;P&gt;vVar.SetContent ch.text, false&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;Help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Dec 2014 11:35:41 GMT</pubDate>
    <dc:creator>wonkymeister</dc:creator>
    <dc:date>2014-12-16T11:35:41Z</dc:date>
    <item>
      <title>Macro Help - Set a Cell Value with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Help-Set-a-Cell-Value-with-Variable/m-p/745731#M667284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to set a cell in a straight table with a value from a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but my code isn't setting the cell with the value from the variable, instead its deleting the value from the variable. i think its getting the cell value (null) and setting the variable to it (null)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rather than doing what i want which is to get the value from the variable and setting it to the cell!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub GetTotal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set ch = ActiveDocument.GetSheetObject("CH01").GetCell(1,5)&amp;nbsp; 'empty cell to populate&lt;/P&gt;&lt;P&gt;set vVar = ActiveDocument.Variables("vMyVariable") 'my variable that stores the value&lt;/P&gt;&lt;P&gt;vVar.SetContent ch.text, false&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;Help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 11:35:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Help-Set-a-Cell-Value-with-Variable/m-p/745731#M667284</guid>
      <dc:creator>wonkymeister</dc:creator>
      <dc:date>2014-12-16T11:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Help - Set a Cell Value with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Help-Set-a-Cell-Value-with-Variable/m-p/745732#M667285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Qlikview is not a spreadsheet application like MS-Excel. It is not possible to set the value of a single cell. The values in the cells are calculated based on the dimensions and expressions of the chart (and the selections made by the user).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 12:26:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Help-Set-a-Cell-Value-with-Variable/m-p/745732#M667285</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-12-16T12:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Help - Set a Cell Value with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Help-Set-a-Cell-Value-with-Variable/m-p/745733#M667286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-left: 12px;"&gt;the API provides a method called SetInputFieldCell which only works with a straight table box:&lt;/P&gt;&lt;P style="margin-left: 12px;"&gt;&lt;/P&gt;&lt;P style="margin-left: 12px;"&gt;set obj = ActiveDocument.GetSheetObject("CH68")&lt;BR /&gt;obj.SetInputFieldCell 0,3,"999" 'set value in 2nd row, 2nd column to 999 &lt;/P&gt;&lt;P style="margin-left: 12px;"&gt;&lt;/P&gt;&lt;P style="margin-left: 12px;"&gt;Why wouldn't this work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 12:49:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Help-Set-a-Cell-Value-with-Variable/m-p/745733#M667286</guid>
      <dc:creator>wonkymeister</dc:creator>
      <dc:date>2014-12-16T12:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Help - Set a Cell Value with Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Help-Set-a-Cell-Value-with-Variable/m-p/745734#M667287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gysbert - i get it now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 08:24:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Help-Set-a-Cell-Value-with-Variable/m-p/745734#M667287</guid>
      <dc:creator>wonkymeister</dc:creator>
      <dc:date>2014-12-17T08:24:43Z</dc:date>
    </item>
  </channel>
</rss>

