Finding a Shape

  • Thread starter Thread starter Patrick C. Simonds
  • Start date Start date
P

Patrick C. Simonds

Is there any way to find any shapes that have been inserted to a worksheet
and then delete them?
 
Sub ShapesCut()
For Each s In ActiveSheet.Shapes
s.Cut
Next
End Sub
'or
Sub shapescut1() 'Tom Ogilvy
ActiveSheet.Shapes.SelectAll
Selection.Delete
End Sub
 
You can try this:
Sub CleanRectangles()

Dim i As Integer
i = 1
Do Until i > 7
Sheets("Sheet1").Rectangles.Delete
Sheets("Sheet1").Lines.Delete
'etc., etc., etc.,
i = i + 1
Loop

End Sub

Regards,
Ryan---
 
No need for the loop, simply

Sheets("Sheet1").DrawingObjects.Delete

(won't delete comments or filter arrows)

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top