fredrerik84
Active Member
- Joined
- Feb 26, 2017
- Messages
- 383
Im trying to remove most of my shapes from my sheet but a few of them Id like to keep They are in cell S21 and ab21
the range of cells i want to delete are stored in range(a27:BS & last row")
Ive tried like this
But this codes still deletes shapes in S21 and ab21 , which I like to keep. they are Rounded Rectangles 10 shapes total. No mater what I try they get deleted.
Anyone know how I can keep them ?
frederik
the range of cells i want to delete are stored in range(a27:BS & last row")
Ive tried like this
Code:
Set Rng = Range(Cells(26, "C"), Cells(lr, "P"))
For Each sh In ActiveSheet.Shapes
On Error Resume Next
If Intersect(Rng, sh.TopLeftCell) Is Nothing Then
Else
sh.Delete
End If
Next sh
But this codes still deletes shapes in S21 and ab21 , which I like to keep. they are Rounded Rectangles 10 shapes total. No mater what I try they get deleted.
Anyone know how I can keep them ?
frederik