Split Method
Splits a task into portions.
Syntax
expression**.Split(StartSplitOn, EndSplitOn)**
*expression * Required. An expression that returns a Task object.
StartSplitOn Required Variant. The start date of the task split. If a time is not specified, the project's default end time for the working period is used.
EndSplitOn Required Variant. The 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
Applies to | Task Object, Tasks Collection Object
See Also | OptionsSchedule Method | SplitParts Property | SplitTask Method