Task.Split メソッド (Project)

タスクを 2 つに分割します。

構文

Split (StartSplitOnEndSplitOn)

Task オブジェクトを表す変数。

パラメーター

名前 必須 / オプション データ型 説明
StartSplitOn 必須 バリアント型 (Variant) タスクの分割の開始日を指定します。 時間を指定しない場合、プロジェクトの既定の終了時刻が使用されます。
EndSplitOn 必須 バリアント型 (Variant) 分割タスクの終了日です。 時間を指定しない場合は、プロジェクトの既定の開始時刻が使用されます。 EndSplitOnStartSplitOn で指定された日付の前後にある場合、分割は作成されません。

次の使用例は、指定されたタスクを分割します。

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

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。