Share via


Task.SplitParts Property

Project Developer Reference

Returns a SplitParts collection that represents the portions of a task. Read-only Object.

Syntax

expression.SplitParts

expression   A variable that represents a Task object.

Return Value
SplitParts

Example
The following example returns the number of task portions for each task in the active project.

Visual Basic for Applications
  Sub CountTaskPortions()
    Dim T As Task, HowMany As Long
For Each T In ActiveProject.Tasks
    HowMany = 0
    If Not (T Is Nothing) Then
        HowMany = HowMany + T.<strong class="bterm">SplitParts</strong>.Count
        MsgBox T.Name &amp; ": " &amp; HowMany &amp; " task portion(s)"
    End If

Next T

End Sub

See Also