View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Clearing Comments?

"(PeteCresswell)" wrote in message

Namely: When I go to clear the comments, a chart that happens to be
positioned
over the range containing the comments seems to get deleted.


"Jon Peltier" wrote in message
I can't see why your code is deleting any charts.


I replicated the OP's problem IF a chart on same sheet is selected while
doing
rng.ClearComments

This is irrespective of where the chart is located if on same sheet as
comment(s) being deleted which is also the activesheet. Ie not necessarily
"positioned over the range containing the comments". Also, when doing that
the cell comment(s) is/are not deleted.

Similar occurs for me if any object is selected, eg a selected Rectangle
will get deleted instead of the comment.

So it would seem sensible to ensure the current selection is any cell range
before deleting comments (if deleting comments on the activesheet).

Regards,
Peter T