Table of contents
TOC
Collapse the table of content
Expand the table of content

Task.Split Method (Project)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Splits the task into two portions.

Syntax

expression. Split( ** StartSplitOn, ** EndSplitOn )

expression A variable that represents a Task object.

Parameters

NameRequired/OptionalData TypeDescription
StartSplitOnRequiredVariantThe start date of the task split. If a time is not specified, the project's default end time for the working period is used.
EndSplitOnRequiredVariantThe end date of the task split. If a time is not specified, the project's default start time for the working period is used. If EndSplitOn is on or before the date specified with StartSplitOn, the split is not created.

Example

The following example creates a split in the specified task.

Sub CreateSplit() 
    Dim WhichTask As Long 
    Dim SplitFrom As Variant, SplitTo As Variant 

    WhichTask = InputBox("Enter the ID of the task you would like to split:") 
    SplitFrom = InputBox("Enter the date and time for the start of the" &; _
        " split: " &; vbCrLf &; vbCrLf &; "(The default time is the end" &; _
    " time of the preceding working period.)") 
    SplitTo = InputBox("Enter the date and time for the end of the split:" &; _
        vbCrLf &; vbCrLf &; "(The default time is the start time of the next" &; _
        " working period.)") 

    ActiveProject.Tasks(WhichTask).Split SplitFrom, SplitTo 
End Sub
© 2018 Microsoft