View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Deleting an ambiguous shape name


For Each shp In ActiveSheet.Shapes
If shp.Type < msoChart Then
shp.Delete
End If
Next shp
"WBTKbeezy" wrote:

Joel:

That works great except I failed to mention I also have two graphs on the
same sheet that I DO NOT want deleted (which your macro does), is there a way
around that caveat?

"Joel" wrote:

For Each shp In ActiveSheet.Shapes
shp.Delete
Next shp

"WBTKbeezy" wrote:

Hello:

I am trying to write/record a macro that will clear out a worksheet in
specific ranges. It is easy to deal with the text portions, but the worksheet
also contains a picture that also needs to be deleted, but the picture is
different each week and always has a different name. Is there a way to select
a shape if I can't pinpoint the name value?
Thanks.