View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] juuljus.jogar@gmail.com is offline
external usenet poster
 
Posts: 2
Default testing if there are named shapes on a sheet


kirjutas:
Hi,

I need to test if there are 3 named shapes (box1, box2 and box3) on the
worksheet or not. If they are present, delete them and if not then do
nothing.


Thanks,
Juuljus


Got it working:

On Error Resume Next
ActiveSheet.Shapes("box1").Delete
ActiveSheet.Shapes("box2").Delete
ActiveSheet.Shapes("box3").Delete
On Error GoTo 0

If someone has other ideas, still I would be interested.

J