autoshapes round 2

  • Thread starter Thread starter scrabtree
  • Start date Start date
S

scrabtree

The code:

ActiveSheet.Shapes.SelectAll
Selection.Delete

Deleted all the Autoshapes. It also deleted all the
buttons and dropdown boxes, too. How can I just delete
Autoshapes without deleting buttons etc.?
 
Sub a()
Dim X As Shape
For Each X In ActiveSheet.Shapes
If X.Type = msoAutoShape Then X.Delete
Next
End Sub


--
Jim Rech
Excel MVP
| The code:
|
| ActiveSheet.Shapes.SelectAll
| Selection.Delete
|
| Deleted all the Autoshapes. It also deleted all the
| buttons and dropdown boxes, too. How can I just delete
| Autoshapes without deleting buttons etc.?
|
 

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