Hi,
Hoping somebody can help me with this one please. I need some code that will delete all objects within a range....in particular AA1:AZ50 on a worksheet named "COMPARISON". I found the code below on the forum but it doesn't delete the objects for me.
The object names will vary so I can't reference them specifically.
Is anybody able to help me please?
Thanks, Iain
Hoping somebody can help me with this one please. I need some code that will delete all objects within a range....in particular AA1:AZ50 on a worksheet named "COMPARISON". I found the code below on the forum but it doesn't delete the objects for me.
VBA Code:
Sub Test()
Dim Sh As Shape
With Worksheets("COMPARISON")
For Each Sh In .Shapes
If Not Application.Intersect(Sh.TopLeftCell, .Range("AA1:AZ50")) Is Nothing Then
If Sh.Type = msoShape Then Sh.Delete
End If
Next Sh
End With
End Sub
The object names will vary so I can't reference them specifically.
Is anybody able to help me please?
Thanks, Iain