ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Identify OWC11 spreadsheets (https://www.excelbanter.com/excel-programming/373418-identify-owc11-spreadsheets.html)

quartz[_2_]

Identify OWC11 spreadsheets
 
I am using Office 2003 on Windows XP.

I need to loop through all of the graphical objects on the activesheet and
determine if one or more OWC11 spreadsheet controls exist there. There may be
zero to many objects of any type. Ideally, the function would return an array
of the object references so I can pass that along to subsequent routines.

Can someone please post some example code illustrating how to do this or at
least how to identify the object types using some sort of name like: OWC11
Spreadsheet, Drawing Object, Graphical Image, etc?

Thanks much in advance.

Tom Ogilvy

Identify OWC11 spreadsheets
 
Sub ABC()
Dim oleObj as OLEObject
for oleObj in Activesheet.OleObjects
msgbox typename(oleObj.Object) & " - " & oleObj.Name
Next
End sub



See what you get back.

also look at the shape object/shapes collection

--
Regards,
Tom Ogilvy


"quartz" wrote:

I am using Office 2003 on Windows XP.

I need to loop through all of the graphical objects on the activesheet and
determine if one or more OWC11 spreadsheet controls exist there. There may be
zero to many objects of any type. Ideally, the function would return an array
of the object references so I can pass that along to subsequent routines.

Can someone please post some example code illustrating how to do this or at
least how to identify the object types using some sort of name like: OWC11
Spreadsheet, Drawing Object, Graphical Image, etc?

Thanks much in advance.



All times are GMT +1. The time now is 02:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com