[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 67
  • Last Modified:

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,
0
csehz
Asked:
csehz
  • 2
2 Solutions
 
Rob HensonIT & Database AssistantCommented:
Is it all Objects on the sheet that are to be deleted?

If so:

ActiveSheet.DrawingObjects.Select
Selection.Delete

Thanks
Rob H
0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Only this is suffice...

Sub DeletePictures()
ActiveSheet.DrawingObjects.Delete
End Sub

Open in new window

0
 
csehzAuthor Commented:
Thanks very much
0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome. Glad to help.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now