Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

problem in Clear Chart object from macro

Hi,

I am using attach and detach from macro

SUB TEST
If ((ActiveDocument.Evaluate("=GetSelectedCount(STATUS)")) Or (ActiveDocument.Evaluate("=GetSelectedCount(COUNTRY)")) Or (ActiveDocument.Evaluate("=GetSelectedCount(SPECIFIC)")) Or (ActiveDocument.Evaluate("=GetSelectedCount(CERT)")) ) > 0 Then
ActiveDocument.GetSheetObject("CH06").Attach
Else
ActiveDocument.GetSheetObject("CH06").Detach
End If
END SUB

Now the problem is, if I click clear after filtering from list boxes, the chart is not able to clear the selection and its applying Detach. How to I clear selection from the chart and apply detach.

Thanks in Advance

1 Reply
Not applicable
Author

Hi

I can't really understand you intention, you want a detached chart when non of the fields are selected?

To check on that I would rather use + instead of OR? And I cant really see why you would detach if nothing is selected (or is the check only on a subset of fields?).

Anyway - I would add a msgbox to see that the macro actually gets called with the clear event.

Regards

Juerg