View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default How can I programatically identify and delete an image?

You can make a copy of the sheet without the picures. This code might work
for you...

Sub CopyWithoutImages()
Dim wksNew As Worksheet
Dim wks As Worksheet

For Each wks In Worksheets
wks.Cells.Copy
Set wksNew = Sheets.Add
wksNew.Range("A1").PasteSpecial xlValues
'Do that voodoo that you do
wksNew.Delete
Next wks
Application.CutCopyMode = False
End Sub

This pastes only the values from the original sheet to the new sheet. The
new sheet is deleted after you finish your database stuff... If you want to
you could place the new sheets in a different workbook and not delete them.

HTH

"Henry Stock" wrote:

I am working on a bunch of macros that manuipulate data from accounting for
input into a database.

Some of the worksheets I get tend to have a logo attached to the data sheet.
The logo just makes it hard to see the real data I want to work with.

I would like to identify a way I could detect the existence of an image and
then programatically remove it so that my other data minipulation won't
have to deal with it. Can somebody tell me how to do that?

--
Henry Stock, IT Professional
onProject.com
3 Wing Drive
Cedar Knolls, NJ 07927-1006