Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Doesn´t work a macro in the onOpen Trigger

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!

3 Replies
Gysbert_Wassenaar

Are you talking about opening in Qlikview Desktop or opening in the ajax client in the browser? The OnOpen trigger doesn't work in the ajax client.


talk is cheap, supply exceeds demand
Not applicable
Author

I use the trigger when I open the Qlikview Desktop

Peter_Cammaert
Partner - Champion III
Partner - Champion III

What do you mean by "it doesn't work properly"? It doesn't zoom well, or it doesn't work at all?

If you attach the same action to a button, does clicking the button cause the sheets to be fitted to your window area?

Take into account that a zoom like this will make all objects fit into the window area. This includes invisible objects.

Best,

Peter