Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to change the position of a sheet object by using macro ?

Hi,

I have button object and i need a macro that changes the position of this button.

Does the api lets this or not ?

Thank you.

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

This is from the API Guide:

rem ** move all objects on active sheet 20 pixels down and 15 right **

set sh = ActiveDocument.ActiveSheet

for i = 0 to sh.NoOfSheetObjects-1

    set obj = sh.SheetObjects(i)

    pos = obj.GetRect

    pos.Top = pos.Top + 20

    pos.Left = pos.Left + 15

    obj.SetRect pos

next

View solution in original post

1 Reply
m_woolf
Master II
Master II

This is from the API Guide:

rem ** move all objects on active sheet 20 pixels down and 15 right **

set sh = ActiveDocument.ActiveSheet

for i = 0 to sh.NoOfSheetObjects-1

    set obj = sh.SheetObjects(i)

    pos = obj.GetRect

    pos.Top = pos.Top + 20

    pos.Left = pos.Left + 15

    obj.SetRect pos

next