2 Replies Latest reply: Apr 7, 2015 9:20 AM by Alexander Strohmaier RSS

    FitZoomToWindow Not working

    Helen Pippard

      Hello

       

      I have researched on the internet and have found the following code:

       

       

        SUB FitZoomToWindow

      ActiveDocument.ActiveSheet.FitZoomToWindow
      ActiveDocument.ActiveSheet.ApplyZoomToAllSheets

      END SUB

       

      However this does not seem to be working in my button which I ahve assigned the macro too

       

      I understand the above script to be VBScript, I am running this off our server which has Excel 2007 installed.  I know that Microsoft have stopped external uses for running vbscript in Excel 2007, could this be why the macro is not working for me?

       

      Has anyone else experienced the syntex not running, and how they overcame this problem?

       

      Thanks

      Helen