Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Macro only works the first time?

I have a macro that is only working the first time it is executed with a button.  It also works when I push the test button from the Edit Module box.  This is getting a bit frustrating. Any thoughts???

Requested Module Security is Safe Only

Current Local Security is Safe Mode

Here's the code but I don't think its the problem.


Sub RestoreMainCharts()

' Temporarily turn off the AutoMinimize so that we can
' put 2 charts on the front panel without them auto-minimizing
' themselves.
SetAutoMinimize "CH74", false
SetAutoMinimize "CH75", false


SetAutoMinimize "CH74", true
SetAutoMinimize "CH75", true

' Minimize all the chart objects.

End Sub

Sub SetAutoMinimize(chart, state)
rem ** Set auto-minimize flag for a chart **
set g = ActiveDocument.GetSheetObject(chart)
set gp = g.GetProperties
gp.GraphLayout.Frame.AutoMinimize = state
g.SetProperties gp

End sub


Tags (1)
1 Reply
Not applicable

Macro only works the first time?

So it appears to be something with the button.  I deleted all the other actions except Run Macro and it Works.  I think I just need to inclued the code for the other actions.

Community Browser