Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default OLEObjects collections for embedded files

PS

You may find it easier to get straight at OLEObjects & drawingobjects in
general if you don't use punctuation like "." in the name unless as it seems
you need to. Punctuation is much less restricted with the shapes collection.

Peter T

"Peter T" <peter_t@discussions wrote in message
...

"John" wrote in message
ps.com...

Peter T wrote:
Have a go with this -

For i = 1 To ActiveSheet.OLEObjects.Count
If ActiveSheet.OLEObjects(i).name = sName Then
ActiveSheet.OLEObjects(i).Delete
'Exit For
End If
Next

Regards
Peter T

This works. I would still like to be able to reference these objects
via name, but this works for my purposes.

Thanks.


Dim shp As Shape, oOLE As OLEObject

Set shp = ActiveSheet.Shapes(sName)

' if you want to delete
'shp.Delete

'or work with the OLE
Set oOLE = shp.DrawingObject

Regards,
Peter T




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
Embedded files Lindae Excel Discussion (Misc queries) 1 May 18th 09 12:08 PM
embedded wav files ARGT Excel Discussion (Misc queries) 4 July 21st 08 10:53 AM
Running an add-in recursively on embedded files akullen[_2_] Excel Programming 1 June 17th 06 10:26 PM
Embedded files in Excel jminickene Excel Programming 0 October 8th 04 02:41 AM
embedded files nath Excel Programming 0 September 17th 03 02:17 PM


All times are GMT +1. The time now is 03:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"