With Microsoft Excel, when you have used an Excel file so a long time, you will think your Excel file is so slow and slowly opening. Some of the reasons are for shape creation in your Excel file. And so your Excel file size is irregularly large.
So if you want to remove/delete all shapes in your Excel file, you can be using VBA code.
Excel contents :
How to delete all shapes in an Excel file
1 – Open the Excel file
2 – Press Alt+F11 (for open visual basic editor)
3 – Choose a sheet (if you want to delete all shapes in ActiveSheet), choose This Workbook (if you want to delete all shapes in all sheets), and double-click on it. And then write the below VBA code down.
Remove all shapes (VBA code) :
Sub DeleteAllShapes()
Dim Shp As Shape
For Each Shp In ActiveSheet.Shapes
If Not (Shp.Type = msoOLEControlObject Or Shp.Type = msoFormControl) Then Shp.Delete
Next Shp
End Sub
4 – Run Macro (F5)
So your code is running until you finish
Final Result :
Your Excel file maybe is faster than before and the Excel file is reduced to a size lower than before.
Note: all display shapes and hidden shapes are deleted, So please unselect your shapes.