ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete all Shapes from selected Range (https://www.excelbanter.com/excel-programming/379523-re-delete-all-shapes-selected-range.html)

Chip Pearson

Delete all Shapes from selected Range
 
Try code like the following:

Dim Rng As Range
Dim SH As Shape
Dim TLC As Range
Set Rng = Range("F4:AJ23")
For Each SH In ActiveSheet.Shapes
If Not Application.Intersect(Rng, SH.TopLeftCell) Is Nothing Then
SH.Delete
End If
Next SH



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)



"CLR" wrote in message
...
Hi All..........
I need help please for the code to delete all Shapes, Images,
DrawingObjects, whatever, from a selected range of F4:AJ23.....I only seem
to
be able to get rid of them by individual name. I want everything out of
there.

TIA
Vaya con Dios,
Chuck, CABGx3






All times are GMT +1. The time now is 09:54 PM.

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