Remove all Pictures

D

DaveMoore

I want to remove all pictures in an Excel worksheet I shall be working on.
Can I do this in one (or two) actions? or must I select each one
individually?

This is likely to be an ongoing requirement, can a macro be written for
this?

Many thanks for any help offered.

Dave Moore
 
N

Nikos Yannacopoulos

Dave,

Try this simple code:

sh = ActiveSheet.Shapes.Count
For i = 1 To sh
ActiveSheet.Shapes(1).Select
Selection.Delete
Next

HTH,
Nikos
 
R

Ron de Bruin

Hi DaveMoore

I like to add this to J.E's macro

This will also delete controls from the control toolbox.
Maybe no problem but if it is try this

Sub test()
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
If shp.Type = msoPicture Then
shp.Delete
End If
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top