delete all pictures in a worksheet

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
If you just want the first column of data, then copy the table and in Excel do a Paste Special Text. That will not paste the graphics or their associated links.

Or if you do a paste with the graphics, open the Drawing toolbar and click the arrow (select tool). Then drag over all the pictures and press Delete.
 
Upvote 0
This one clears all objects (here, named as MWIICons) from a worksheet, with the exception of one named "CSALogo". Obviously, if you have one/some you want to keep, you could code it accordingly.
Play with it, you'll get the hang of it in a minute!

Regards,
XLXRider

Code:
Sub ClearIcons()
'ClearIcons from the active worksheet
   Dim ws As Worksheet
   For Each MWIIcon In ActiveSheet.Shapes
    Select Case MWIIcon.Name
        Case "CSALogo"  ' do nothing
    Case Else
      MWIIcon.Delete
     End Select
        Next MWIIcon
End Sub
 
Upvote 0
Re: MWIIcon

Yes, it is an arbitrary name. I made a couple of toolbars called "MWI Icon" and "MWI Icon2" (Manufacturing Work Instructions) so decided to use - for lack of a better name! - MWIIcon to declare the objects. I did get most of the code from this board, and just modified it to suit my situation. Again, all I did was to grab the code, put up a test file, and mess around with it.

HTH!

Regards,
XLXRider
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,020
Members
448,938
Latest member
Aaliya13

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top