ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Shapes (https://www.excelbanter.com/excel-discussion-misc-queries/52339-shapes.html)

aftamath

Shapes
 
Whats the VBA code to delete all the shapes on a worksheet?

Bernie Deitrick

Shapes
 
Sub TryNow()
Dim mySht As Worksheet
Set mySht = ActiveSheet
mySht.Shapes.SelectAll
Selection.Delete
End Sub

--
HTH,
Bernie
MS Excel MVP


"aftamath" wrote in message
...
Whats the VBA code to delete all the shapes on a worksheet?




i-Zapp

Shapes
 

Sub deleteshapes()
For Each shp In ActiveSheet.Shapes
shp.Delete
Next shp
End Sub


--
i-Zapp
------------------------------------------------------------------------
i-Zapp's Profile: http://www.excelforum.com/member.php...fo&userid=5768
View this thread: http://www.excelforum.com/showthread...hreadid=479462



All times are GMT +1. The time now is 04:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com