View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default verify a shape exists in the sheet

Hi vandaley

One way is to use on error

On Error Resume Next
ActiveSheet.Shapes("AAPicture").Delete
On Error GoTo 0


--
Regards Ron de Bruin
http://www.rondebruin.nl



"vandaley" wrote in message ups.com...
Hi,

I am trying to delete a shape from a sheet with:

ActiveSheet.Shapes("AAPicture").Select
Selection.Delete

I need to verify first that the shape exists so the user wont get an
error that the object doesnt exists.

How can i do that?

Thanks,