View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.charting
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default Link embedded chart to a commandbutton?

Hi,

The basic code would be, which will toggle visibility of first chartobject
on sheet.

Sub Button2_Click()

ActiveSheet.ChartObjects(1).Visible = Not
ActiveSheet.ChartObjects(1).Visible

End Sub

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Bob" wrote in message
...
I have a embedded chart which I wish to show the chart when I press a
commandButton and hide the chart when I press either the same button or
another one.
--
Bob