Discussion Board for collaboration related to Creating Analytics for QlikView.
I need a help on macro.
I have two tabs in one report. I have selection boxes on both tabs. When I move from first tab to second tab, I need to clear the selection boxes.I did that using the below macro,
sub ClearActiveDocument.Fields("F1").clearend sub
Now, when I move back to first tab, I need the same selection which I selected previously (prior to moving to second tab). could someone help me with the macro.
Ex: I clear the selection made on "F1", when I move to 2nd tab. I need the selection made on "F1" to be present, when moved to 1st tab.
Please see the attachment
Go to Solution.
Using a public variable should do the trick:
Public Selectionsub AwayFromTab1 set Selection = ActiveDocument.Fields("F1").GetSelectedValues ActiveDocument.Fields("F1").clearend subsub BackToTab1 set f1 = ActiveDocument.Fields("F1") f1.SelectValues Selectionend sub
I hope this helped you out.
for i=0 to valcount-1
Thanks Jay and Janseen. It worked as I expected.
You're welcome, but where is Jay's solution?
It's reposted now.