Selection.Tasks Property

Project Developer Reference

Returns a Tasks collection representing the tasks in the active selection. Read-only Object.

Syntax

expression.Tasks

expression   A variable that represents a Selection object.

Return Value
Tasks

Example
The following example displays the name of every task in the selection.

Visual Basic for Applications
  Sub TaskNames()
Dim T As Task, Names As String

For Each T In ActiveSelection.<strong class="bterm">Tasks</strong>
    Names = Names &amp; T.Name &amp; vbCrLf
Next T

MsgBox Names
    

End Sub

See Also