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

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
Author

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

View solution in original post

5 Replies
Not applicable
Author

Hi all,

Need help in resolving the above issue.

Regards,

Amay.

Not applicable
Author

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
Specialist
Specialist

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
Author

Thanks Migle and Neha...:)_

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

Not applicable
Author