Andy thanks for that.
At the moment when I press the commanbutton(3) I can see the chart
underneath the active page?
--
Bob
"Andy Pope" wrote:
Probably because of the email formatting.
The syntax should be on 1 line.
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
...
Andy,
Tried it and I get a syntax error message
--
Bob
"Bob" wrote:
Many thanks Andy, I shall try that out on friday when i am back at work
--
Bob
"Andy Pope" wrote:
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