Delete all auto shapes in active worksheet with VBA
Using VBA macro can help you delete all auto shapes in active worksheet quickly.Step 1: Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
Step 2: Click Insert >> Module, and paste the following macro in the Module Window.
VBA: delete all shapes in active worksheet.
Sub DeleteShapes()
Dim Shp As Shape
For Each Shp In ActiveSheet.Shapes
Shp.Delete
Next Shp
End Sub
Dim Shp As Shape
For Each Shp In ActiveSheet.Shapes
Shp.Delete
Next Shp
End Sub
Then you will see all shapes in active worksheet are deleted quickly.
Notes:
1. This VBA macro can only delete all shapes in active worksheet.
2. This VBA macro can delete all kinds of shapes in active worksheet, including pictures, ClipArt, Shapes, SmartArt, charts, Text boxes, etc.
No comments:
Post a Comment