3 Replies Latest reply: Jul 6, 2016 5:37 AM by Peter Cammaert RSS

    Doesn´t work a macro in the onOpen Trigger

    Iñigo Asensio

      Hi,

       

      I have insert an OnOpen trigger in order to run a macro to fit the window, but when I open the qlikview document, it doesn´t work properly.

      What can I do to run the macro when I open the document? Is there other solution to run this macro without insert this action on a text box?

       

      This is the code that I have used to the macro.

       

      Sub Zoom

      ActiveDocument.GetApplication.WaitForIdle

      ActiveDocument.ActiveSheet.FitZoomToWindow

      ActiveDocument.GetApplication.WaitForIdle

      ActiveDocument.ActiveSheet.ApplyZoomToAllSheets

      End Sub

       

      Thank you very much!