See all How-To Articles

How to Remove all Pictures / Objects From an Excel Workbook

This tutorial will show you how to remove all the images in an Excel worksheet at once.Pictures SelectAll

Removing images with Select Contents

1. To select all the images in your Excel worksheet, choose Home> Find & Select > Go to Special from the ribbon.

Pictures GoToSpeical

2. Select Objects, and then click OK.

 

Pictures GoToSpecial Objects

All objects (images) in the active worksheet are selected.

Pictures GoToSpecial SelectAll

3. Press Delete.

Remove images with VBA

We can also delete all pictures with a VBA loop.

Sub DeletePictures()
   Dim oPic As Shape
   Dim wb As Workbook
   Dim ws As Worksheet
   'Loop through all worksheets
   For Each ws In ActiveWorkbook.Worksheets
   'Loop through all objects in the selected worksheet
      For Each oPic In ws.Shapes
      'Delete object
         oPic.Delete
      Next oPic
   Next ws
End Sub

1. In Excel, press ALT + F11 on the keyboard to switch to the VBE (Visual Basic Editor).

2. Select Insert > Module from the menu.

Pictures VBA Module

3. Enter the above code into the module window.

PIctures VBA Code

4. Make sure you have clicked inside your subprocedure, and then click Run or press F5 on the keyboard to execute the code.Pictures VBA Run Code