ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   autoshapes round 2 (https://www.excelbanter.com/excel-programming/306885-autoshapes-round-2-a.html)

scrabtree[_2_]

autoshapes round 2
 
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.?


Jim Rech

autoshapes round 2
 
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
"scrabtree" wrote in message
...
| 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.?
|




All times are GMT +1. The time now is 02:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com