Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default How can I programatically identify and delete an image?

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default How can I programatically identify and delete an image?

Henry,

The following code will identify all Shapes and delete them

for each sht in activeworkbook.sheets
for each shp in sht.shapes

shp.delete

next
next

http://HelpExcel.com
"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



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
Identify (not delete) exact duplicates Gene Excel Discussion (Misc queries) 2 June 19th 09 06:21 PM
Macro needed to identify value and delete row if value below targe Pyrotoy New Users to Excel 3 December 9th 08 11:35 PM
Identify the duplicate and delete with details in excel mat Excel Discussion (Misc queries) 0 November 15th 06 09:03 PM
Delete Code Modules Programatically blatham Excel Discussion (Misc queries) 1 February 3rd 06 05:38 PM
Changing what is displayed in an image control programatically Eric Kehr Excel Programming 2 April 27th 04 08:16 AM


All times are GMT +1. The time now is 10:27 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"