Show/Hide Charts

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have several Charts on one sheet.
is there any way to show and hide individual charts
by programming buttons to select them.
i.e. Button1 show chart1
Button2 Hide chart2
etc...
 
Hi John,

A simply macro to assign to a button would be;

Sub Button3_Click()
ActiveSheet.ChartObjects("Chart 1").Visible = _
Not ActiveSheet.ChartObjects("Chart 1").Visible
End Sub

You will need to alter the name of the chartobject to suit.
To see the chartobject name hold the shift key and then select the
chart. The name should appear in the NameBox next to the formula bar.

I have several Charts on one sheet.
is there any way to show and hide individual charts
by programming buttons to select them.
i.e. Button1 show chart1
Button2 Hide chart2
etc...

--

Cheers
Andy

http://www.andypope.info
 
Back
Top