Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default delete images in an excel sheet

Hi

My Macros retrieves graphs from an external app as jpg images and
pastes them in the sheet.

before i run this macro i want to delete these old images. i tried this
but it is not an oleobject. how are images treated as in excel

For Each obj In Sheet1.OLEObjects

obj.Delete

Next oCheck

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default delete images in an excel sheet

See
http://www.rondebruin.nl/controlsobjectsworksheet.htm

For example

Sub Shapes1()
'Delete all Objects except Comments
On Error Resume Next
ActiveSheet.DrawingObjects.Visible = True
ActiveSheet.DrawingObjects.Delete
On Error GoTo 0
End Sub


--
Regards Ron De Bruin
http://www.rondebruin.nl



wrote in message oups.com...
Hi

My Macros retrieves graphs from an external app as jpg images and
pastes them in the sheet.

before i run this macro i want to delete these old images. i tried this
but it is not an oleobject. how are images treated as in excel

For Each obj In Sheet1.OLEObjects

obj.Delete

Next oCheck



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default delete images in an excel sheet



" wrote:

... before i run this macro i want to delete these old images. i tried this but it is not an oleobject. how are images treated as in excel


Try:

For Each pic In Sheet1.Shapes
pic.Delete
Next


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
Using an Excel sheet for batch delete Colin Hayes Excel Worksheet Functions 18 September 23rd 08 04:38 PM
how do i sort a data sheet which has images in it also? Arpit Gupta Excel Discussion (Misc queries) 2 September 12th 08 12:43 AM
how can you delete multiple images Mish Excel Worksheet Functions 1 March 7th 08 04:55 PM
Delete Images scott Excel Programming 1 January 7th 05 10:50 PM
VBA code to insert images in excel sheet Riya Excel Programming 2 October 29th 03 12:22 PM


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