Share via


Selection Object

Project Developer Reference

Represents a selection in the active project. There is no collection for Selection objects. The Selection object can be accessed only through the ActiveSelection property of the Application object.

Using the Selection Object

Use the ActiveSelection property to return a Selection object. The following example lists the names of all the resources in the selection.

  Dim R As Resource, Names As String
    
For Each R In ActiveSelection.Resources
    Names = R.Name & ListSeparator & " " & Names
Next R

MsgBox Left$(Names, Len(Names) - Len(ListSeparator & " "))

See Also