Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
ivandrago
Creator II
Creator II

Fit Zoom to window Macro

Hi,

I have version 11 sr2 installed on the server, I have currently got the
following macro as a OnActivate Sheet Trigger

Sub Zoom
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.ActiveSheet.FitZoomToWindow
End Sub

It seem to work fine when a user has a 17 inch screen but anything smaller i.e 15 inch screen,
it autosize the sheet to the point it is too small for the user to see the charts etc.. is there an alternative macro that will align all
sheets on the document it activates to its best visualisation?

Thanks

7 Replies
ivandrago
Creator II
Creator II
Author

Anyone?

fkeuroglian
Partner - Master
Partner - Master

Hi, you could do something like that

sub mas_zoom

set mysheet=ActiveDocument.ActiveSheet

set sp=mysheet.GetProperties

sp.ZoomFactor = sp.ZoomFactor + 0.1

mysheet.SetProperties sp

end sub

sub menos_zoom

set mysheet=ActiveDocument.ActiveSheet

set sp=mysheet.GetProperties

sp.ZoomFactor = sp.ZoomFactor - 0.1

mysheet.SetProperties sp

end sub

not adjust the screen but allow you to get more or less zoom

---------------------------------------------------------------------------------------------------------------------------------------------

are you using IEPlugin or Full Browser to use FitZoomToWindow?

Good luck

Fernando

ivandrago
Creator II
Creator II
Author

Yes I am using IE plugin, so do I use both the macros you have provided?

Bill_Britt
Former Employee
Former Employee

Hi Ivan,

There is a document extension that will work for AJAX and you can find it here.

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
fkeuroglian
Partner - Master
Partner - Master

Hi, try to add the two sub that i gave to you, to have the posibility yo do +zoom and - zoom

good luck

please tell how you do it and if it is work

Fernando

ivandrago
Creator II
Creator II
Author


Thanks Fernando, it looks ok what you have done. Based on the macros you have provided instead of having a macro button for each Zoon In/Zoom Out is it possible to have a slider so when the user moves the slider the screen goes bigger and the decreases when move the slider the other way?

ivandrago
Creator II
Creator II
Author


So is it possible to create a slider that would would increase the screen size?