Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.68 KB

Project.Task.Split.md

File metadata and controls

53 lines (36 loc) · 1.68 KB
title ms.service api_name ms.assetid ms.date ms.localizationpriority
Task.Split method (Project)
project-server
Project.Task.Split
847c5cfd-a10f-ea6a-aa49-2e2e88d1840e
06/08/2017
medium

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

[!includeSupport and feedback]