Delete all drawings/shapes except DownArrows
The .name property isn't what you want to you. The Name is the string you see
in the namebox (to the left of the formulabar).
I'd try:
Option Explicit
Sub DeleteShapesExceptDownArrows()
Dim MyShape As Shape
For Each MyShape In ActiveSheet.Shapes
If MyShape.AutoShapeType < msoShapeDownArrow Then
MyShape.Delete
End If
Next MyShape
End Sub
On 02/23/2011 03:53, Pete wrote:
Sub DeleteShapesExceptDownArrows()
Dim MyShape As Object
For Each MyShape In ActiveSheet.Shapes
If MyShape.Name < msoShapeDownArrow Then
MyShape.Delete
End If
Next MyShape
End Sub
--
Dave Peterson
|