close

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

Hi Steve

See
www.rondebruin.nl/controlsobjectsworksheet.htmSub 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
www.rondebruin.nlquot;Stevequot; gt; wrote in message ...
gt;I have added a macro that will copy a piece of word art and assigned it to a
gt; control button and paste it over a employee on a daily timesheet. I use this
gt; when an employee is off for the day. I have also made another macro that
gt; clears the contents of all relevant cells on the timesheet. I include with
gt; this macro a cut command for the word art to be removed. However, not every
gt; employee is off on the same day so I get a error if the wordart is not there.
gt; Is there any way to fix this so that it will remove the wordart on the
gt; relevant employee?
gt; Thanks in advance

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()