<?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 Changing a container caption via a macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Changing-a-container-caption-via-a-macro/m-p/345676#M127854</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;Is it possible to change the title of a container object's caption via macro code? If so, what is the syntax?&lt;/P&gt;&lt;P&gt;The container object includes a pivot table with three tabs. &lt;/P&gt;&lt;P&gt;I have gotten as far as being able to identify the container object and access its properties:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino;"&gt;set ct = ActiveDocument.GetSheetObject("CT02")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino;"&gt;set c = ct.GetProperties&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this, I can see the container's current caption:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino;"&gt;msgbox(ct.GetCaption.Name.v)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I want to change the caption; there isn't something as obvious as 'SetCaption', so what is the syntax for changing the caption in (VBScript) macro code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case this has anything to do with versioning, I am using Qlikview v10 SR3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Mar 2012 17:31:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-03-09T17:31:43Z</dc:date>
    <item>
      <title>Changing a container caption via a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-a-container-caption-via-a-macro/m-p/345676#M127854</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;Is it possible to change the title of a container object's caption via macro code? If so, what is the syntax?&lt;/P&gt;&lt;P&gt;The container object includes a pivot table with three tabs. &lt;/P&gt;&lt;P&gt;I have gotten as far as being able to identify the container object and access its properties:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino;"&gt;set ct = ActiveDocument.GetSheetObject("CT02")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino;"&gt;set c = ct.GetProperties&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this, I can see the container's current caption:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino;"&gt;msgbox(ct.GetCaption.Name.v)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I want to change the caption; there isn't something as obvious as 'SetCaption', so what is the syntax for changing the caption in (VBScript) macro code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case this has anything to do with versioning, I am using Qlikview v10 SR3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2012 17:31:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-a-container-caption-via-a-macro/m-p/345676#M127854</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-09T17:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a container caption via a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-a-container-caption-via-a-macro/m-p/345677#M127855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi V B &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hope the attached file will be helpful for you .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; We can change the caption using the variable and i attached the sample macro code file to you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using this you can simply change your container caption (using variable).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Mar 2012 05:49:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-a-container-caption-via-a-macro/m-p/345677#M127855</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-10T05:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a container caption via a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-a-container-caption-via-a-macro/m-p/345678#M127856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; There is no way to change the caption directly you have use it by using variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a variable vVariable.Assign the initial caption value to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use this variable in caption as =vVariable&lt;/P&gt;&lt;P&gt;Then use macro below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub containerCaption&lt;/P&gt;&lt;P&gt;set ct = ActiveDocument.GetSheetObject("CT02")&lt;/P&gt;&lt;P&gt;set c = ct.GetProperties&lt;/P&gt;&lt;P&gt;msgbox(ct.GetCaption.Name.v)&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vVariable")&lt;/P&gt;&lt;P&gt;v.SetContent "Sales",true&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Mar 2012 06:32:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-a-container-caption-via-a-macro/m-p/345678#M127856</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-03-10T06:32:01Z</dc:date>
    </item>
  </channel>
</rss>

