Marco that will delete pictures,but not command buttons


Posted by Paul B on October 30, 2001 9:11 AM

Is there a marco that will delete pictures that have been inserted, but not command buttons on sheet1? I am using Excel ’97. Thanks for your help.

Posted by Barrie Davidson on October 30, 2001 9:51 AM

Will this work for you?

Sub DeleteShapes()
' Macro written by Barrie Davidson
For Each Shape In ActiveSheet.Shapes
If Shape.Type = msoPicture Then
Shape.Delete
End If
Next Shape
End Sub


Regards,
BarrieBarrie Davidson



Posted by Paul B on October 30, 2001 10:46 AM

THANKS! that works