Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to create a macro that would "check" the Show Legend on the presentation tab of my chart (CH28) but my code doesn't seem to work. Thanks in advance for your help!
figured it out...here is the code:
sub SetLegend
set Graph = ActiveDocument.GetSheetObject("CH28")
set p = Graph.GetProperties
set cp = p.ChartProperties
set leg = cp.Legend
if leg.Show = false then
leg.Show = true
else
leg.Show = false
end if
Graph.SetProperties p
end sub
figured it out...here is the code:
sub SetLegend
set Graph = ActiveDocument.GetSheetObject("CH28")
set p = Graph.GetProperties
set cp = p.ChartProperties
set leg = cp.Legend
if leg.Show = false then
leg.Show = true
else
leg.Show = false
end if
Graph.SetProperties p
end sub