Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro problem

Dear Community

i have 3 charts on a tab and a list box to open up each time in a different chart. I have done a Vbscript macro (my first) but don't work ....(Restore Errors).. Can someone help me.

Regards

Riccardo

2 Replies
Not applicable
Author

I have an identical function on one of my tab. The only difference is I do a tab check because this is tab specific. And I've set "SelectionChart" macro run on an "OnSelect" action of "Inline_Field". Hope this works for you.

sub SelectionChart
set s1 = ActiveDocument.ActiveSheet
if s1.GetProperties.Name = "Tab1" then
set vAlignSelected = ActiveDocument.fields("Inline_Field").GetSelectedValues

select case vAlignSelected.Item(0).Number

case 1
set I = ActiveDocument.GetSheetObject("CH11")

if I.IsMinimized =False then
I.Minimize
set L = ActiveDocument.GetSheetObject("CH12")
L.Restore
end if

case 2
set J = ActiveDocument.GetSheetObject("CH12")

if J.IsMinimized = False then
J.Minimize
set K = ActiveDocument.GetSheetObject("CH11")
K.Restore
end if
end select
end if
End Sub

Not applicable
Author

thank's for your help..

Unfortunately i have the same problem 😞 .. the systen stop macro at the .Restore command..

Ric.