Thread: deselect chart
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default deselect chart

I have not tried this, but it might work.

Sub dk()
For Each s In ActiveSheet.Shapes
If s.Name < "Chart1" Then
s.Delete
End If
Next
End Sub


"MikeF" wrote in message
...

Need to select all shapes and delete them.
However there is a chart - "Chart1" - that needs to be deselected, as it
needs to remain on the sheet.

Have made numerous attempts, this one seems to make sense but doesn't
work....
ActiveSheet.Shapes.SelectAll
ActiveSheet.Shapes("Chart1").Deselect

How do I select all shapes, then deselect Chart1?

Thanx,
- Mike