Deleting Pictures - Brain meltdown

F

Frogtoe

Any idea how to delete an inserted picture in Excel in VBA:

(There is probably a really simple solution to my days of frustration
with this, but at this point it's a downward spiral)

If a picture is aleady on a worksheet, how can I select this and delete
it (there will only be one picture on a sheet, but probably a few
charts also)
 
J

JE McGimpsey

One way:

Dim shShape As Shape
For Each shShape In ActiveSheet.Shapes
If shShape.Type = msoPicture Then
shShape.Delete
Exit For
End If
Next shShape
 
D

Dave Peterson

How about:

activesheet.pictures.delete

Frogtoe < said:
Any idea how to delete an inserted picture in Excel in VBA:

(There is probably a really simple solution to my days of frustration
with this, but at this point it's a downward spiral)

If a picture is aleady on a worksheet, how can I select this and delete
it (there will only be one picture on a sheet, but probably a few
charts also)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top