Show/Hide Charts

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...
 
A

Andy Pope

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top