April 2006
Beginner
1114 pages
98h 16m
English
Use the UsedObjects collection to get a mixed collection of all of the objects currently loaded in Excel. The UsedObjects collection has the following members
:
Application Count Creator Item Parent
The following code displays a list of all the objects loaded in Excel. The code uses error handling to skip over properties not available for the different types of objects included in the UsedObjects collection:
Sub ShowObjects( )
Dim obj As Object, str As String
On Error Resume Next
Debug.Print "Type", "Name", "ProgID"
For Each obj In Application.UsedObjects
str = TypeName(obj)
str = str & vbTab & obj.Name
str = str & vbTab & obj.progID
Debug.Print str
Next
End SubRead now
Unlock full access