Share via


Task.Split-Methode (Project)

Unterbricht den Vorgang und teilt ihn in zwei Abschnitte auf.

Syntax

Ausdruck. Split (StartSplitOn, EndSplitOn)

Ausdruck Eine Variable, die ein Task-Objekt darstellt.

Parameter

Name Erforderlich/Optional Datentyp Beschreibung
StartSplitOn Erforderlich Variant Der Anfangstermin der Vorgangsunterbrechung. Wenn keine Zeit angegeben wird, wird die Standardendzeit des Projekts für den Arbeitszeitraum verwendet.
EndSplitOn Erforderlich 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. Wenn EndSplitOn am oder vor dem mit StartSplitOn angegebenen Datum liegt, wird die Aufteilung nicht erstellt.

Beispiel

Im folgenden Beispiel wird eine Unterbrechung des angegebenen Vorgangs erstellt.

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 und Feedback

Haben Sie Fragen oder Feedback zu Office VBA oder zu dieser Dokumentation? Unter Office VBA-Support und Feedback finden Sie Hilfestellung zu den Möglichkeiten, wie Sie Support erhalten und Feedback abgeben können.