Thank you very much for your solution. My spreadsheet is full of littl
charts that only need a quick view and need to be closed after that
that's why it would be easier to make them dissapear with a press on
button. So I tried your suggestion that is shown below. Unfortunatel
it works only the first time when I added the autoshape with th
assigned macro. After it deleted a chart one time it doesn't want to d
it after that anymore...
What am I doing wrong?
Sub delchart()
'
' delchart Macro
' Macro recorded 27.2.2004 by Registered User
'
ActiveSheet.ChartObjects(1).Visible = False
'
End Sub
Thanks very much!
Robb
--
Message posted from http://www.ExcelForum.com
You need to decide what you want to do. Deleting an object is
different from hiding it. Also, you need to provide more details: what
does it mean when you write "it doesn't want to do it after that
anymore...?" What doesn't want to do what to whom when?
Note that deleting the object requires one keystroke. Why would anyone
believe that is is better to click a button and run a macro that mimics
pressing the Delete button is not clear to me.
If you hide an object, it is still on the worksheet using up resources.
It just is no longer visible. If you keep on 'deleting' objects by
hiding them and creating new objects as required, sooner or later you
will run into all sorts of resource problems.

Signature
Regards,
Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
> Thank you very much for your solution. My spreadsheet is full of little
> charts that only need a quick view and need to be closed after that,
[quoted text clipped - 21 lines]
> ---
> Message posted from http://www.ExcelForum.com/
VILLABILLA - 28 Feb 2004 09:28 GMT
Thank you for your reply, sorry if I was unclear, I ment that the macr
you gave me only takes out the first chart on my sheet, after that i
doesn't work anymore. Without a doubt a handy solution but not for m
issue... Yestersay I received this macro:
Dim ch As ChartObject
For Each ch In ActiveSheet.ChartObjects
ch.Delete
Next ch
It deletes the charts, not hides them, or am I wrong?
It atleast seems to work very fine...
If it would be as easy to just use the delete button then I wouldn'
raise this issue. The spreadsheet will be used pretty intensively b
several users, so I want it to be as user friedly as possible. I don'
want to select chart by chart and delete them if I can also just delet
them with a click on a button.
Kindest regards
--
Message posted from http://www.ExcelForum.com