Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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
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.
Yves ,it worked as expected, thanks for your advice, also to oleg for his contribution!!!!