WhtChoklat
Technical User
Here is the Code I currently have. Everything works except for the SetTaskField Method. Am I even using the right method. Can someone please help me.
Dim NumOfTask As Integer
NumOfTask = MSProject.ActiveProject.NumberOfTasks
For i = 1 To NumOfTask
Dim RemainingCost As Double
Dim BaselineCost As Double
Dim Cost1 As Double
Dim Cost2 As Double
Dim CostIndicator As Double
Dim Number6 As Object
RemainingCost = ActiveProject.Tasks(i).RemainingCost
BaselineCost = ActiveProject.Tasks(i).BaselineCost
Cost1 = ActiveProject.Tasks(i).Cost1
Cost2 = (Cost1 + RemainingCost)
CostIndicator = Cost2 / BaselineCost
Set Number6 = ActiveProject.Tasks(i).Number6
SetTaskField Field:=Number6, Value:=CostIndicator, AllSelectedTasks:=False, Create:=False, TaskID:=i, ProjectName:=ActiveProject
Next
Signed,
Ed
Dim NumOfTask As Integer
NumOfTask = MSProject.ActiveProject.NumberOfTasks
For i = 1 To NumOfTask
Dim RemainingCost As Double
Dim BaselineCost As Double
Dim Cost1 As Double
Dim Cost2 As Double
Dim CostIndicator As Double
Dim Number6 As Object
RemainingCost = ActiveProject.Tasks(i).RemainingCost
BaselineCost = ActiveProject.Tasks(i).BaselineCost
Cost1 = ActiveProject.Tasks(i).Cost1
Cost2 = (Cost1 + RemainingCost)
CostIndicator = Cost2 / BaselineCost
Set Number6 = ActiveProject.Tasks(i).Number6
SetTaskField Field:=Number6, Value:=CostIndicator, AllSelectedTasks:=False, Create:=False, TaskID:=i, ProjectName:=ActiveProject
Next
Signed,
Ed