A
Andy Boruta
I am trying to distribute work evenly between a start date and target date.
My problem is that Project places work AFTER the target date, even though the
timephase period (tsvWork) specifically states the end date (gblEnd). Can
you explain how hours got into Work after gblEnd?
Here are the variables:
x = loop variable for assinment
vTot = that particular resource's totaled availability for the period
vRemWork = Holder for total work (I zero it out before redistribution)
tsvWork = the daily timephase Work object
vDay = a holder for the allocation for the current day
vRemWork =
ActiveProject.Tasks(gblTaskId).Assignments(x).RemainingWork
ActiveProject.Tasks(gblTaskId).Assignments(x).RemainingWork = 0
Set tsvWork =
ActiveProject.Tasks(gblTaskId).Assignments(x).TimeScaleData(gblStart, gblEnd,
_
Type:=pjAssignmentTimescaledWork, TimescaleUnit:=pjTimescaleDays)
For y = 1 To tsvAvail.Count
If tsvAvail(y) <> "" Then
vDay = (vRemWork * (tsvAvail(y) / vTot))
tsvWork(y).Value = vDay
End If
Next y
My problem is that Project places work AFTER the target date, even though the
timephase period (tsvWork) specifically states the end date (gblEnd). Can
you explain how hours got into Work after gblEnd?
Here are the variables:
x = loop variable for assinment
vTot = that particular resource's totaled availability for the period
vRemWork = Holder for total work (I zero it out before redistribution)
tsvWork = the daily timephase Work object
vDay = a holder for the allocation for the current day
vRemWork =
ActiveProject.Tasks(gblTaskId).Assignments(x).RemainingWork
ActiveProject.Tasks(gblTaskId).Assignments(x).RemainingWork = 0
Set tsvWork =
ActiveProject.Tasks(gblTaskId).Assignments(x).TimeScaleData(gblStart, gblEnd,
_
Type:=pjAssignmentTimescaledWork, TimescaleUnit:=pjTimescaleDays)
For y = 1 To tsvAvail.Count
If tsvAvail(y) <> "" Then
vDay = (vRemWork * (tsvAvail(y) / vTot))
tsvWork(y).Value = vDay
End If
Next y