Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with setting TOP & LEFT position to CurrentSelectionBox

Hello QV Experts,

I am getting below error while executing below code please help

error: Object doesn't support this property or method: 'prop.SetRect'

set obj=ActiveDocument.Sheets("Main").CreateCurrentSelectionBox

set prop=obj.GetRect

prop.Top=200

prop.Left=20

prop.SetRect prop

1 Solution

Accepted Solutions
Not applicable
Author

Hi All,

I found way to achive. Below is the code might help others

set mybox = ActiveDocument.Sheets("Main").CreateCurrentSelectionBox

set fr = mybox.GetFrameDef

pos = fr.Rect

pos.Top = 300 + 20

pos.Left = 15

mybox.SetFrameDef fr

View solution in original post

1 Reply
Not applicable
Author

Hi All,

I found way to achive. Below is the code might help others

set mybox = ActiveDocument.Sheets("Main").CreateCurrentSelectionBox

set fr = mybox.GetFrameDef

pos = fr.Rect

pos.Top = 300 + 20

pos.Left = 15

mybox.SetFrameDef fr