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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
hectorgarcia
Partner - Creator III
Partner - Creator III

zoom macro not working after upgrade from 7.5 to 8.5

guys , after our recent upgrade from 7.5 to 8.5 following this simple but very appreciated by my users , stopped working

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

sub Zomm
set mysheet=ActiveDocument.ActiveSheet
set sp=mysheet.GetProperties
set v= ActiveDocument.Variables("varZoom")
var=v.GetContent.string/100
sp.ZoomFactor=var
mysheet.SetProperties sp
ActiveDocument.ActiveSheet.ApplyZoomToAllSheets
end sub

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

any ideas will be appreciated

Hector





1 Solution

Accepted Solutions
yblake
Partner - Creator II
Partner - Creator II

Add ActiveDocument.GetApplication.WaitForIdle just prior to ApplyZoomToAllSheets to let QV time to display new window size, and it will work fine in 8.5.

View solution in original post

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hector,

API set is changing all the time, so I'm guessing some of your function interfaces had changed. In fact, I see at least one change already - I think the string needs another "suffix" .v:

var=v.GetContent.string.v/100

A sure way to find out is to run your macros with a debugger and see where it fails. You might have to install Microsoft Script debugger if you haven't done so before.

Oleg

yblake
Partner - Creator II
Partner - Creator II

Add ActiveDocument.GetApplication.WaitForIdle just prior to ApplyZoomToAllSheets to let QV time to display new window size, and it will work fine in 8.5.

hectorgarcia
Partner - Creator III
Partner - Creator III
Author

Yves ,it worked as expected, thanks for your advice, also to oleg for his contribution!!!!