The following code will solve your problem of deleting picture from excel :
Code:
Dim eqn, pic, graphics, sh, temp, shAddress, shCount, shName
Set graphics = Sheets("Graphics")
shCount = ActiveSheet.Shapes.Count
If shCount = 0 Then
Else
For Each sh In ActiveSheet.Shapes 'Find and delete the existing equation box & schematic
shCount = ActiveSheet.Shapes.Count
shName = sh.Name
Select Case Left(LCase(shName), 3)
Case "pic", "eqn", "obj"
sh.Delete 'Delete it
Case Else 'Don't delete drop-down lists or other shape objects
End Select
Next sh
End If
Bookmarks