Task.Split method (Project)
Splits the task into two portions.
Syntax
expression.Split (StartSplitOn, EndSplitOn)
expression A variable that represents a Task object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.