Untitled
Anonymous
Plain Text
09/04/2025 8:29 AM
390 B
15
Indexable
Never
Sub DeleteAllShapesSafe()
Dim ws As Worksheet
Dim shp As Shape
For Each ws In ActiveWorkbook.Worksheets
For Each shp In ws.Shapes
On Error Resume Next ' skip shapes that can't be deleted
shp.Delete
On Error GoTo 0
Next shp
Next ws
MsgBox "All possible shapes deleted (some may have been skipped)."
End SubEditor is loading...
Leave a Comment