Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I update an object dynamical from a variable

How do I update an object dynamical from a variable. In this case i want to move a text object regarding the value in the variable "TX06TopStart".
But how should I do to put the variable in "pos.Top"


sub MoveObject
set sh = ActiveDocument.ActiveSheet
set obj = sh.SheetObjects("TX06")
set v = ActiveDocument.GetVariable("TX06TopStart")
pos = obj.GetRect
pos.Top = 185
pos.Left = 40
obj.SetRect pos
end sub


1 Solution

Accepted Solutions
Not applicable
Author

Your variable holds the value you would like for pos.Top?

If so, then you need something like:

pos.Top = CInt(v.GetContent.String)


View solution in original post

2 Replies
Not applicable
Author

Your variable holds the value you would like for pos.Top?

If so, then you need something like:

pos.Top = CInt(v.GetContent.String)


Not applicable
Author

Hi, thanks for quick answer. It´s working as you said.