Cell.Task Property

Project Developer Reference

Returns a Task object representing the task in the active cell. Read-only Object.

Syntax

expression.Task

expression   A variable that represents a Cell object.

Return Value
Task

Example
The following example displays the names of all tasks at the same outline level as the selected task.

Visual Basic for Applications
  Sub Siblings()
Dim MyParent As Task
Dim Sibling As Task
Dim Temp As String

Set MyParent = ActiveCell.<strong class="bterm">Task</strong>.OutlineParent

For Each Sibling In MyParent.OutlineChildren
    Temp = Sibling.Name &amp; ListSeparator &amp; " " &amp; Temp
Next Sibling

Temp = Left$(Temp, Len(Temp) - Len(ListSeparator &amp; " "))
MsgBox Temp

End Sub

See Also