Selection Object

Application
Selection
Multiple objects

Represents a selection in the active project. There is no collection for Selection objects. The Selection object can only be accessed 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 & " "))

Properties | Application Property | FieldIDList Property | FieldNameList Property | Parent Property | Resources Property | Tasks Property

Parent Objects | Application Object

Child Objects | List Object | Resource Object, Resources Collection Object | Task Object, Tasks Collection Object

See Also | ActiveSelection Property