Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
thank's for your help..
Unfortunately i have the same problem 😞 .. the systen stop macro at the .Restore command..
Ric.