• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Select all images delete

Mudassar.freedi

New Member
Dear chandoo,


I have been forwarded an excel file containing multiple images, which create file size larger. i want to delete all images in one go. i tried to select all images using seletion pane, but not succeeded. can you help me plz?
 
Sub delete_image()


On Error Resume Next

ActiveSheet.DrawingObjects.Delete

On Error GoTo 0


End Sub
 
@ indian, thanks for your reply. sorry, but i couldn't understand, what you did say.


Is there any solution available in ms excel by default?


Regards,

Hafiz Mudassar
 
Oh sorry.........you can use this code in the marco....right click on your sheet name view code...you will get a project explorer...right click on your sheet name (left side box) in the project explorer.....insert module....double click on the module...and paste the above code.....now goto macro and click delete_image...this should delete all objects on the active sheet...
 
Hi, you can try to use GO TO (menu Edit or Ctrl + G) -> SPECIAL -> OBJECTS. It selects all drawings (but also buttons etc)
 
Back
Top