Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Identify (not delete) exact duplicates | Excel Discussion (Misc queries) | |||
Macro needed to identify value and delete row if value below targe | New Users to Excel | |||
Identify the duplicate and delete with details in excel | Excel Discussion (Misc queries) | |||
Delete Code Modules Programatically | Excel Discussion (Misc queries) | |||
Changing what is displayed in an image control programatically | Excel Programming |