Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Steve
 
Posts: n/a
Default delete picture with macro

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
  #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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
delete macro Jane Makinson Excel Discussion (Misc queries) 3 March 15th 06 11:54 AM
DELETE A PICTURE TUNGANA KURMA RAJU Excel Discussion (Misc queries) 4 November 24th 05 12:19 PM
Macro data selection line delete Frantic Excel-er Excel Discussion (Misc queries) 0 May 31st 05 11:46 PM
Macro to delete first line of 200+ files Bob Dobalina Excel Discussion (Misc queries) 2 May 26th 05 10:04 PM
delete personal macro kalz Excel Discussion (Misc queries) 3 March 22nd 05 03:13 AM


All times are GMT +1. The time now is 12:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"