Freigeben über


Project.AutoAddResources-Eigenschaft (Project)

True, Wenn neue Ressourcen automatisch erstellt werden, wie Sie jeweils zugeordnet sind. False, wenn Project fordert vor dem Erstellen der neuer Ressourcen. Boolescher Wert mit Lese-/Schreibzugriff.

Syntax

Ausdruck. AutoAddResources

Ausdruck Eine Variable, die ein Project-Objekt darstellt.

Beispiel

Das folgende Beispiel fordert den Benutzer um die AutoAddResources, AutoCalculate, AutoLinkTasks, AutoSplitTasks und AutoTrack Eigenschaften festzulegen.

Sub PromptForAutoPropertySettings() 
    Dim I As Integer ' Used in For...Next loop 
    Dim Prompts(5) As String ' Prompts to display on the screen 
    Dim Response As Long ' User response to prompt 
    Dim Responses(5) As Long ' Used to store user responses 
 
    ' Set each prompt. 
    Prompts(1) = "Automatically create new resources as they are assigned?" 
    Prompts(2) = "Automatically recalculate a project when a value, such as a date or cost, changes?" 
    Prompts(3) = "Automatically link sequential tasks when you cut, move, or insert tasks?" 
    Prompts(4) = "Automatically split tasks into parts for work complete and work remaining?" 
    Prompts(5) = "Automatically update the remaining work and cost for a resource when the completion percentage of one of the resource's tasks changes?" 
 
    ' Display each prompt, and store the user's responses. 
    For I = 1 To 5 
        Response = MsgBox(Prompts(I), vbYesNo) 
        Responses(I) = (Response = vbYes) 
    Next I 
 
    ' Set the automatic properties according to the user's responses. 
    ActiveProject.AutoAddResources = Responses(1) 
    Calculation = Responses(2) 
    ActiveProject.AutoLinkTasks = Responses(3) 
    ActiveProject.AutoSplitTasks = Responses(4) 
    ActiveProject.AutoTrack = Responses(5) 
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.