Skip to main content
Announcements
Marching toward a simplified navigation! READ ON
cancel
Showing results for 
Search instead for 
Did you mean: 
andy
Partner - Creator III
Partner - Creator III

My macro to enable/disable chart expression often has to be rerun, why?

Hi folks,

I attach a small trivial qvw.

I have done a button-macro-variables solution to enable disable expressions in a pivot chart.

It works as excpected. BUT if I toggle more than one variable, suppose alla expressions are shown and I want to hide all those on which I have an option (that is all expressiones exept no 0), then most of the times 2 of them are hidden in the first push on the button and then two more pushes hides the other 2 expressions.

I guess I have done some bad coding but since I'm not used to VB at all I just cannot find it myself but asks for some clever macro-coder to tell me what is wrong.

/Andy

2 Replies
andy
Partner - Creator III
Partner - Creator III
Author

It works if I put in a messagebox on which I have to press OK before every expression is enabled/disabled. Things are going to fast for Qlikview?

MsgBox("Cnt= "& Cnt)



Not applicable

Probably a bit late for you, but for other's benefit...

You might like to try adding the following line of code between API calls - this will give time for Qlikview to catch it's breath before starting the next action:

ActiveDocument.GetApplication.WaitForIdle(1000)

Cheers,

Graeme