Vba delete all shape in Excel

To do it in Excel, here is the answer:

  1. Option Explicit
  2. Sub DeleteShapes()
  3. Dim shp As Shape
  4. ''
  5. 'Loop through all Shapes in ActiveSheet and delete each one.
  6. For Each shp In ActiveSheet.Shapes
  7. shp.Delete
  8. Next shp
  9. End Sub

Description:

a) Lines 6-8 - Loop through all Shapes in ActiveSheet and delete each Shape.

 

You can find similar Excel Questions and Answer hereunder

1) How can I prevent users from seeing / accessing my macro code?

2) Here a explanation about the global seek function in VBA. Goal Seek is another tool under What If analysis that does a unique function as Scenario Manager.

3) I have several pictures that are misaligned - manually aligning them is very laborious. Is there an automatic alignment option?

4) Excel 2010 vba replacement of application filesearch in Excel

5) How can I hide a specific Shape in my WorkSheet?

6) How can I set FreezePanes in a certain range using VBA?

7) How can I change the Marker size and Marker line color for all the series in a chart?

8) Userform initialize vs userform show in Excel

9) How can I sort data using VBA?

10) How can I check if a file exists in a folder using VBA?

 

Here the previous and next chapter