LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Removing picture from a worksheet

Hi All,

I have about 90 different worksheets and majority of worksheets have a
imagine file called 'picture 1'.

All I am trying to do is delete this picture from every worksheets. So
far I've done:



For Each ws In ThisWorkbook.Worksheets

Set DelPic = ws.Shapes("Picture 1")
'DelPic.Delete

Next


This macro runs fine if there is a picture 1 in the worksheet but
because some of the worksheets don't really have a picture. It creates
an error. How do I condition it so it only deletes 'picture 1' if
there is one in the worksheet?

Thank you so much


Regards


James
 
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
Removing a picture box from an Excel 2007 spreadsheet SMG Excel Worksheet Functions 6 February 13th 09 08:46 AM
Removing a picture box in Excell 2007 SMG Excel Discussion (Misc queries) 0 February 13th 09 12:40 AM
How to extract a picture from an Excel worksheet into a picture fi SARANJAI Excel Discussion (Misc queries) 10 June 12th 05 05:00 AM
How to retrieve the name of a picture within a worksheet? Oscar Excel Programming 3 January 5th 04 01:39 AM
Removing Picture from Cell Command Bar Bernie Deitrick[_2_] Excel Programming 0 August 8th 03 02:59 PM


All times are GMT +1. The time now is 08:00 PM.

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"