Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
Partner
Partner

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





Tags (2)
1 Solution

Accepted Solutions
Partner
Partner

zoom macro not working after upgrade from 7.5 to 8.5

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.

3 Replies
MVP & Luminary
MVP & Luminary

zoom macro not working after upgrade from 7.5 to 8.5

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

Partner
Partner

zoom macro not working after upgrade from 7.5 to 8.5

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.

Partner
Partner

zoom macro not working after upgrade from 7.5 to 8.5

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