Name
Application.UsedObjects
Synopsis
Returns a collection of all the objects used in Excel. This code displays the names and types of all the objects currently in use by Excel:
Sub TestUsedObjects( ) Dim o, name As String On Error Resume Next Debug.Print "Type", "Name" For Each o In Application.UsedObjects name = o.name Debug.Print TypeName(o), name Next End Sub
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.