Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is it possible to change the title of a container object's caption via macro code? If so, what is the syntax?
The container object includes a pivot table with three tabs.
I have gotten as far as being able to identify the container object and access its properties:
set ct = ActiveDocument.GetSheetObject("CT02")
set c = ct.GetProperties
With this, I can see the container's current caption:
msgbox(ct.GetCaption.Name.v)
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?
In case this has anything to do with versioning, I am using Qlikview v10 SR3.
Many thanks,
VB
hi V B
Hope the attached file will be helpful for you .
We can change the caption using the variable and i attached the sample macro code file to you
Using this you can simply change your container caption (using variable).
Regards
Ashok
Hi,
There is no way to change the caption directly you have use it by using variable.
Create a variable vVariable.Assign the initial caption value to it.
Use this variable in caption as =vVariable
Then use macro below
sub containerCaption
set ct = ActiveDocument.GetSheetObject("CT02")
set c = ct.GetProperties
msgbox(ct.GetCaption.Name.v)
set v = ActiveDocument.Variables("vVariable")
v.SetContent "Sales",true
end sub
Hope it helps
Celambarasan