Deleting Autoshapes

bayoung

Board Regular
Joined
May 3, 2004
Messages
94
I have a spreadsheet with an autoshape that has been pasted over itself approximately 10,000 times. I need to delete all of them. The name of the shape is "Autoshape 10203", "Autoshape 10202" etc.

Is there anyway to do a mass deletion?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
I have a spreadsheet with an autoshape that has been pasted over itself approximately 10,000 times. I need to delete all of them. The name of the shape is "Autoshape 10203", "Autoshape 10202" etc.

Is there anyway to do a mass deletion?
Try..
Edit|Go To...|Special...|Objects|OK
That should select them all (though I haven't tested with so many!!) and then you can hit Delete.
 
Upvote 0
Hi,

This macro removes all shapes in the entire workbook

Code:
Sub Rem_Shapes()

Dim sh As Shape
Dim ws As Worksheet

For i = 1 To ThisWorkbook.Sheets.Count

Set ws = Sheets(i)

    For Each sh In ws.Shapes
        
        sh.Delete
    
    Next sh

Next i

End Sub

If you want to remove items with the name AutoShape in them then replace sh.delete with

Code:
If Left(sh.Name, 9) = "AutoShape" Then sh.Delete

Hope it helps
 
Upvote 0

Forum statistics

Threads
1,213,504
Messages
6,114,020
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top