Quickly Delete All Picture Objects

,

This post will guide you how to delete all picture objects in your current worksheet in excel. How do I delete all pictures or charts in your worksheet without having to select each one and delete them by manually in excel. How to delete all picture objects using VBA code in excel.

You can use the Go To feature or using VBA code to quickly delete all pictures in your current worksheet.

Delete All Pictures with Go To Feature


If you want to quickly delete all pictures in your worksheet, you need to select all pictures firstly, then press Delete key in your keyboard. Just do the following steps:

#1 go to HOME tab, click Find & Select command under Editing group, and select go to from the popup menu list. Or you just press F5 shortcut to open Go To dialog.

delete all picture1

#2 click Special button, the Go To Special dialog will appear. Check Objects radio button in the Select section box. Click OK button.

delete all picture5

delete all picture6

#3 all pictures are selected.

delete all picture4

#4 Press Delete key in your keyboard. You will see that all pictures are deleted.

Delete All Pictures with VBA Code


You can also use an excel VBA macro code to delete all pictures quickly. Just do the following steps:

#1 open your excel workbook and then click on “Visual Basic” command under DEVELOPER Tab, or just press “ALT+F11” shortcut.

Get the position of the nth using excel vba1

#2 then the “Visual Basic Editor” window will appear.

#3 click “Insert” ->”Module” to create a new module

convert column number to letter3

#4 paste the below VBA code into the code window. Then clicking “Save” button.

delete all picture2

Sub deleteAllObjects()
    Dim myObject As Object
    For Each myObject In ActiveSheet.Pictures
        myObject.Delete
    Next myObject
End Sub

#5 back to the current worksheet, then run the above excel macro. Click Run button.

delete all picture3

 

Leave a Reply