Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Macro to Scoll Page

Hi All,

I was wondering if anyone knows of a way to use a macro to scroll the viewable page.  I envision something similar to using a macro to set the top left of a Sheet Object.

===================

(ex.)

Sub MoveChart

  set obj = ActiveDocument.GetSheetObject("CH09")

    pos = obj.GetRect

    pos.Top = pos.Top + 20

    pos.Left = pos.Left + 15

    obj.SetRect pos

End Sub

===================

I am using a button to call the macro that will move the object down to the appropriate place on the sheet but also want to move the viewable focus of the sheet down to match the new location of the object.

I'm sure this group of brilliant minds has run across this at some point and would be willing to share!  (or tell me I'm just chasing a pipe dream) 

Thanks in advance for any advice you could provide.

3 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

I'm not going to comment on your group description (at least I'm not part of you target group ), but you may find this worth considering:

  • Scrolling is bad. If you create a dashboard, try to avoid everything that forces a user to scroll/page down. Imagine that your brand-new electrical car forces you to scroll down the dashboard to get to the mph or rpm dial...
  • Such things do not work in the AccessPoint with AJAX clients (the main work area for most Qlik end-users). You can't manipulate the document layout in a browser using VBScript macros.

I you can explain what this technique is going to be used for, we may be able to offer alternative user-friendly solutions.

Best,

Peter

marcus_sommer

I agree with Peter that scrolling itself isn't very user-friendly and if there is really a mandatory need to have scroll-bars then is using them the easiest and most natural way for the user to access the content there.

Alternatives to the scrolling could be to use containers, show and hide objects with layout-variables controlled by variables, buttons and/or selections or splitting the content into several sheets and a switch between them could be manually or per action triggered.

- Marcus

Not applicable
Author

idk if this helps? FYR:

Macro to Scroll a bar chart to its right

     Scroll position in line chart | Qlik Community

The code is not work for me though, good luck dude!