Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

To Create ZOOM Buttons

Hi all,

I want to create a buttons which will help in zooming the sheet in and out.

I got it for one constant value, I want to do it in a loop.

For ZOOM Out button --> If you click on button each time the zoom percent should increase by 50 percent or so.

For ZOOM In button --> If you click on button each time the zoom percent should decrease by 50 percent or so.

I think I have to have a macro for this to happen, but got less idea on how to proceed.

Thanks in advance.

Regards,

Amay

1 Solution

Accepted Solutions
Not applicable

Re: To Create ZOOM Buttons

Macro for zooming would be like this:

sub ResetZoom15

          set mySheet = ActiveDocument.ActiveSheet

          set sp = mySheet.GetProperties

          sp.ZoomFactor = sp.ZoomFactor*1.5

          mySheet.SetProperties sp

end sub

5 Replies
Not applicable

Re: To Create ZOOM Buttons

Hi all,

Need help in resolving the above issue.

Regards,

Amay.

Not applicable

Re: To Create ZOOM Buttons

Macro for zooming would be like this:

sub ResetZoom15

          set mySheet = ActiveDocument.ActiveSheet

          set sp = mySheet.GetProperties

          sp.ZoomFactor = sp.ZoomFactor*1.5

          mySheet.SetProperties sp

end sub

neha_shirsath
Valued Contributor

Re: To Create ZOOM Buttons

Hii Amay,

Use below macros code for zoom...

Hope it will helop you.

Sub zoom

zoomvalue = ActiveDocument.Evaluate("num(zoom)")

set mysheet=ActiveDocument.ActiveSheet

set sp=mysheet.Getproperties

sp.zoomfactor= zoomvalue * 0.01

mysheet.SetProperties sp

Activedocument.GetApplication.waitforidle

End sub

Sub FitZoom

ActiveDocument.Activesheet.FitZoomToWindow

Activedocument.GetApplication.waitforidle

End sub

Regards,

Neha

Not applicable

Re: To Create ZOOM Buttons

Thanks Migle and Neha...Smiley Happy_

Also, Thanks to this link too http://community.qlik.com/message/192758#192758

Not applicable

Re: To Create ZOOM Buttons

Community Browser