Share via


Task.FixedCost property (Project)

Ruft die festen Kosten für einen Vorgang ab, oder legt sie fest. Variant-Wert mit Lese-/Schreibzugriff.

Syntax

Ausdruck. FixedCost

Ausdruck Eine Variable, die ein Task-Objekt darstellt.

Beispiel

Im folgenden Beispiel werden die festen Kosten markierter Vorgänge um einen durch den Benutzer angegebenen Betrag erhöht.

Sub IncreaseFixedCosts() 
 
 Dim T As Task ' Task object used in For Each loop 
 Dim Entry As String ' Amount to add to any existing fixed cost 
 
 Entry = InputBox$("Increase the fixed costs of marked tasks by what amount?") 
 
 ' If entry is invalid, display error message and exit Sub procedure. 
 If Not IsNumeric(Entry) Then 
 MsgBox ("You didn't enter a numeric value.") 
 Exit Sub 
 End If 
 
 ' Increase the fixed costs of marked tasks by the specified amount. 
 For Each T In ActiveProject.Tasks 
 If T.Marked Then 
 T.FixedCost = T.FixedCost + Val(Entry) 
 End If 
 Next T 
 
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.