Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
1. Can I detach an object (chart) by condition of selection in a pivot table instead of using macro?
2. If I have to use Macro to detach an object, how do I trigger the macro to run for each (any) selection I made within the sheet object?
I never tried this
Try This with Onselect Trigger and give Actions for that.
Sub Detach
ActiveDocument.GetSheetObject("CH01").Detach
End Sub
Why Do you require macro,
Qlikview, we do have option called Detach. Is there any reason to add macro?
how do I find the option? I need the option to be activated by condition only. If that possible?
Right click the Object and then See? If you want Macro. Experts will help you
I know you can do that manually. But I want it to be detached automatically when selection of field (condition) meet.
I never tried this
Try This with Onselect Trigger and give Actions for that.
Sub Detach
ActiveDocument.GetSheetObject("CH01").Detach
End Sub
I find the following from another post:
Attach/Detach an object for selecting List Box
SUB TEST
v_AgentCnt = ActiveDocument.Evaluate("=GetSelectedCount(REGION)")
If v_AgentCnt>0 Then
ActiveDocument.GetSheetObject("CH01").Detach
Else
ActiveDocument.GetSheetObject("CH01").Attach
End If
END SUB
And put it on the field you want (Document/Properties/Triggers/Field Event Triggers) on OnChange event.
(if you're using qv lower than ver 9, Document/Properties/Macros/Field Event Triggers).