Deleting Pictures - Brain meltdown

  • Thread starter Thread starter Frogtoe
  • Start date Start date
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)
 
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
 
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)
 
Back
Top