a simple form to try. Look in name box for the name of your shape
sub deleteallbutoneshape
for each sh in activesheet.shapes
if sh.name<>"yourname" then sh. cut
next
end sub
--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Rick_T" <(E-Mail Removed)> wrote in message
news:46D50336-AF32-4697-AC82-(E-Mail Removed)...
>I have a worksheet that containes a number of shapes (pictures). The
>number
> could range from 1 to 30. I want to deleate all the shapes at one time
> EXCEPT for one particular shape.
> With the code below I can select all the shapes in the worksheet and
> delete
> them. The problem is it also deletes the one shape I want to retain.
>
> Set myDocument = Worksheets("Form-99")
> myDocument.Shapes.SelectAll
> Set sr = Selection.ShapeRange
> Selection.Cut
>
> I tried setting a range of column Q; all the shapes I want to delete are
> in
> the Q column but there is also data in the column I don't want to delete,
> I
> only want to remove the shapes. The problem is that this method only
> deletes
> one shape for each time it runs, it doesn't delete all the shapes with one
> run cycle. I tried deleteAll with the range code but it didn't work.
> Thanks
> for any help you can offer.
>
> Sheets("Form-99").Select
> ActiveSheet.Shapes("Signature").Select
> ActiveSheet.Shapes.Range(Array("Q8:Q74")).Select
> Selection.Cut
> --
> Rick