J
JK
I used the following Dave Peterson procedure to find one of ten pictures
pasted on a WS and delete it. (I modified MsgBox myShape.Name to
myShape.Delete).
Sub testme3()
Dim myCell As Range, myShape As Shape
Set myCell =Range("A1")
For Each myShape In ActiveSheet.Shapes
If Intersect(myShape.TopLeftCell, myCell) Is Nothing Then
'do nothing
Else
MsgBox myShape.Name
Exit For
End If
Next myShape
End Sub
It worked on XP but not XL 97. Is there a similar procedure that will work
for XL 97? I simply want to delete a picture pasted to a certain cell to
avoid pasting another picture over it.
Thank you.
Jim Kobzeff
pasted on a WS and delete it. (I modified MsgBox myShape.Name to
myShape.Delete).
Sub testme3()
Dim myCell As Range, myShape As Shape
Set myCell =Range("A1")
For Each myShape In ActiveSheet.Shapes
If Intersect(myShape.TopLeftCell, myCell) Is Nothing Then
'do nothing
Else
MsgBox myShape.Name
Exit For
End If
Next myShape
End Sub
It worked on XP but not XL 97. Is there a similar procedure that will work
for XL 97? I simply want to delete a picture pasted to a certain cell to
avoid pasting another picture over it.
Thank you.
Jim Kobzeff