Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm using a VB Macro to add an expression to all the listboxes of my document.
Set prop = Objects(k).GetProperties
Set c = prop.Expressions
c.Add
Set x = c.Item(c.Count - 1)
x.Data.ExpressionData.Definition.v = "count(distinct [Ticket])"
Objects(k).SetProperties prop
The problem is that the column is very small and I would like to change the width.
How can I change it ?
I presume it is something with : x.FrameDef.colwidth but i can't find the exact value
And the documentation of this API is really small ..
Thanks
Hello,
this code is for the width of the listbox itself, not the expression.
I have found the answer by using Excel's VBA and the references for Qlikview objects.
In my example, I need to add this line :
Set prop = Objects(k).GetProperties
Set c = prop.Expressions
c.Add
Set x = c.Item(c.Count - 1)
x.Data.ExpressionData.Definition.v = "count(distinct [Ticket])"
x.Data.ExpressionVisual.colWidth=50
Objects(k).SetProperties prop
Thanks anyway
This code should work:
set obj = ActiveDocument.GetSheetObject( "LB01" )
set fr = obj.GetFrameDef
pos = fr.Rect
pos.Width = 300
obj.SetFrameDef fr
Hello,
this code is for the width of the listbox itself, not the expression.
I have found the answer by using Excel's VBA and the references for Qlikview objects.
In my example, I need to add this line :
Set prop = Objects(k).GetProperties
Set c = prop.Expressions
c.Add
Set x = c.Item(c.Count - 1)
x.Data.ExpressionData.Definition.v = "count(distinct [Ticket])"
x.Data.ExpressionVisual.colWidth=50
Objects(k).SetProperties prop
Thanks anyway