Excel 2013 VBA - Delete all pictures from a sheet

Dear Experts,

I have a file which contains a lot of small pictures, could you please advise which VBA code could delete all of them from the sheet?

Thanks in advance,
LVL 1
csehzIT consultantAsked:
Who is Participating?
 
Subodh Tiwari (Neeraj)Connect With a Mentor Excel & VBA ExpertCommented:
Only this is suffice...

Sub DeletePictures()
ActiveSheet.DrawingObjects.Delete
End Sub

Open in new window

0
 
Rob HensonConnect With a Mentor Finance AnalystCommented:
Is it all Objects on the sheet that are to be deleted?

If so:

ActiveSheet.DrawingObjects.Select
Selection.Delete

Thanks
Rob H
0
 
csehzIT consultantAuthor Commented:
Thanks very much
0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome. Glad to help.
0
All Courses

From novice to tech pro — start learning today.