View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron de Bruin
 
Posts: n/a
Default delete picture with macro

Hi Steve

See
http://www.rondebruin.nl/controlsobjectsworksheet.htm


Sub Shapes2()
'Loop through the Shapes collection and use the Type number of the control
Dim myshape As Shape
For Each myshape In ActiveSheet.Shapes

If myshape.Type = 15 Then myshape.Delete
' You can also use myshape.Visible = False

Next myshape
End Sub


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


"Steve" wrote in message ...
I have added a macro that will copy a piece of word art and assigned it to a
control button and paste it over a employee on a daily timesheet. I use this
when an employee is off for the day. I have also made another macro that
clears the contents of all relevant cells on the timesheet. I include with
this macro a cut command for the word art to be removed. However, not every
employee is off on the same day so I get a error if the wordart is not there.
Is there any way to fix this so that it will remove the wordart on the
relevant employee?
Thanks in advance