J
Jayalakshmi
Hi Gill,
Its showing error in 7th line(Tsk.EnterpriseCost1=0) of the below specified
code.
Sub Material_Cost()
Dim Tsk As Task
Dim Res As Resource
Dim Assgn As Assignment
For Each Tsk In ActiveProject.Tasks
If Not Tsk Is Nothing Then
Tsk.EnterpriseCost1 = 0
For Each Assgn In Tsk.Assignments
Set Res = ActiveProject.Resources(Assgn.ResourceID)
If Res.Type = pjResourceTypeMaterial Then
Tsk.EnterpriseCost1 = Tsk.EnterpriseCost1 + Assgn.Cost
End If
Next Assgn
End If
Next Tsk
End Sub
Help me wi th this.
Thanks & Regards,
Jaya
Its showing error in 7th line(Tsk.EnterpriseCost1=0) of the below specified
code.
Sub Material_Cost()
Dim Tsk As Task
Dim Res As Resource
Dim Assgn As Assignment
For Each Tsk In ActiveProject.Tasks
If Not Tsk Is Nothing Then
Tsk.EnterpriseCost1 = 0
For Each Assgn In Tsk.Assignments
Set Res = ActiveProject.Resources(Assgn.ResourceID)
If Res.Type = pjResourceTypeMaterial Then
Tsk.EnterpriseCost1 = Tsk.EnterpriseCost1 + Assgn.Cost
End If
Next Assgn
End If
Next Tsk
End Sub
Help me wi th this.
Thanks & Regards,
Jaya