<?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 Setting a variable in macro - Object Required error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Setting-a-variable-in-macro-Object-Required-error/m-p/215584#M69004</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi QQ,&lt;/P&gt;&lt;P&gt;to use this ... &lt;STRONG&gt;vUser = ActiveDocument.Variables("vOSUser").GetContent.String&lt;/STRONG&gt; ( set exceed)&lt;/P&gt;&lt;P&gt;good luck, Luis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Dec 2010 18:52:41 GMT</pubDate>
    <dc:creator>llauses243</dc:creator>
    <dc:date>2010-12-07T18:52:41Z</dc:date>
    <item>
      <title>Setting a variable in macro - Object Required error</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-a-variable-in-macro-Object-Required-error/m-p/215582#M69002</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'm trying to set a variable in a macro to the OS User name, so i can call the variable later in the macro and use it to write to a databse... However I'm getting an Object required error... heres my code&lt;/P&gt;&lt;P&gt;set table = ActiveDocument.GetSheetObject("TBComments")&lt;BR /&gt; set vUser = ActiveDocument.Variables("vOSUser").GetContent.String&lt;BR /&gt; For RowIter = 1 to table.GetRowCount-1&lt;BR /&gt; set vKPI = table.GetCell(RowIter,1)&lt;BR /&gt; set vMonth = table.GetCell(RowIter,2)&lt;BR /&gt; set vMeeting = table.GetCell(RowIter,0)&lt;BR /&gt; set vComment = table.GetCell(RowIter,4)&lt;BR /&gt; set vKey = table.GetCell(RowIter,3)&lt;/P&gt;&lt;P&gt;All of the variable are set ok, apart from the vUser one, the error i get is Object required: '[string: "ABC"]'&lt;/P&gt;&lt;P&gt;where ABC is the OS username and vOSUser is a variable in the document set to = OSUser()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've also tried&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;set vUser = ActiveDocument.Evaluate("OsUser()")&lt;/P&gt;&lt;P&gt;Can anyone advise where I'm going wrong?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Dec 2010 14:18:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-a-variable-in-macro-Object-Required-error/m-p/215582#M69002</guid>
      <dc:creator />
      <dc:date>2010-12-07T14:18:51Z</dc:date>
    </item>
    <item>
      <title>Setting a variable in macro - Object Required error</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-a-variable-in-macro-Object-Required-error/m-p/215583#M69003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;set vUser=ActiveDocument.getvariable("vOSUser")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Dec 2010 15:19:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-a-variable-in-macro-Object-Required-error/m-p/215583#M69003</guid>
      <dc:creator>martinpohl</dc:creator>
      <dc:date>2010-12-07T15:19:37Z</dc:date>
    </item>
    <item>
      <title>Setting a variable in macro - Object Required error</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-a-variable-in-macro-Object-Required-error/m-p/215584#M69004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi QQ,&lt;/P&gt;&lt;P&gt;to use this ... &lt;STRONG&gt;vUser = ActiveDocument.Variables("vOSUser").GetContent.String&lt;/STRONG&gt; ( set exceed)&lt;/P&gt;&lt;P&gt;good luck, Luis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Dec 2010 18:52:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-a-variable-in-macro-Object-Required-error/m-p/215584#M69004</guid>
      <dc:creator>llauses243</dc:creator>
      <dc:date>2010-12-07T18:52:41Z</dc:date>
    </item>
  </channel>
</rss>

