Hello everybody!
In the Gantt Chart view of tasks there is only one resources column that brings together work and material, however I would like to split the in two columns. Is there any way to separte them?
I've found a VBA subfunction on the internet that is supossed to split the resources in two different columns, however I have tried to run it and it does not compile. The function is as follows:
Sub CalcLaborMaterial()
Dim Job As Task
Dim Iemand As Resource
Dim WieDoenWat As Assignment
CustomFieldPropertiesEx FieldID:=pjCustomTaskCost1,
Attribute:=
For Each Job In ActiveProject.Tasks
If Not Job Is Nothing Then
Job.Cost1 = 0
Job.Cost2 = 0
End If
Next Job
For Each Job In ActiveProject.Tasks
If Not Job Is Nothing Then
Job.Cost1 = 0
Job.Cost2 = 0
For Each WieDoenWat In Job.Assignments
If WieDoenWat.ResourceType = pjResourceTypeWork Then
Job.Cost1 = Job.Cost1 + WieDoenWat.Cost
End If
If WieDoenWat.ResourceType = pjResourceTypeMaterial Then
Job.Cost2 = Job.Cost2 + WieDoenWat.Cost
End If
Next WieDoenWat
End If
Next Job
CustomFieldPropertiesEx FieldID:=pjCustomTaskCost1,
Attribute:=
End Sub
Actually I dont know if this is correct or if there is another way to do so. If anyone could help me with this issue I would really apreciate it! Thanks a lot in advance!