
Originally Posted by
romperstomper
Not necessarily. If it's a picture rather than an image control, you could use:
ActiveSheet.Pictures(1).Delete
instead.
i am not expert in excel macro.
following is code which add image to excel. so looking at it it seems its picture.
right?
If TypeName(ActiveSheet) <> "Worksheet" Then Exit Sub
If Dir(PictureFileName) = "" Then Exit Sub
' import picture
Set p = ActiveSheet.Pictures.Insert(PictureFileName)
' determine positions
With TargetCells
t = .Top
l = .Left
w = .Offset(0, .Columns.Count).Left - .Left
h = .Offset(.Rows.Count, 0).Top - .Top
End With
' position picture
With p
.Top = t
.Left = l
.Width = w
.Height = h
End With
Set p = Nothing
Bookmarks