Share via


UsedObjects Collection

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Application
Aa168089.parchild(en-us,office.10).gifUsedObjects

Represents objects that have been allocated in a workbook.

Using the UsedObjects collection

Use the UsedObjects property of the Application object to return a UsedObjects collection.

Once a UsedObjects collection is returned, you can determine the quantity of used objects in a Microsoft Excel application using the Count property.

In this example, Microsoft Excel determines the quantity of objects that have been allocated and notifies the user. This example assumes a recalculation was performed in the application and was interrupted before finishing.

  Sub CountUsedObjects()

    MsgBox "The number of used objects in this application is: " & _
        Application.UsedObjects.Count

End Sub