V
Vivek Gupta
Hi,
I am setting Actual hours for a given task assignment on a per day basis.I
read Actual start,Actual Finish and Actual hours for a given task assignment
from a text file and set it in mpp accordingly.The actual start and actual
end date is same.
I am facing a peculiar issue for following scenario:
I have a task with duration of 2 days with planned start as 10th feb and
planned end as 11th feb.Now through code I set actual work = 1hrs for 10th
feb and 2 hrs for 11 th feb.As a result Actual start for assignment is set
to 10th feb.Now I clear the actual hrs set on 10th feb.So actual hours is set
to 0 hrs for 10th feb.However I am now expecting Actual start date as 11 th
feb instead of 10th feb.
Is there any way by which I can get the desired result without actually
setting the actual start?
Below is the code snippet to reproduce the issue:
The code sets actuals for the first task and first assignment of that task
in the project.
Dim w_timescaleobj As TimeScaleValue
Dim w_timescalecolln As TimeScaleValues
Dim w_assgnobj As Assignment
'Set act work = 1 hr on 10th feb
Set w_assgnobj = MSProject.ActiveProject.Tasks(1).Assignments(1)
Set w_timescalecolln = w_assgnobj.TimeScaleData("2/10/09", "2/10/09",
pjAssignmentTimescaledActualWork, pjTimescaleDays)
w_timescalecolln.Item(1).Value = 60
'Set act work = 2 hr on 11th feb
Set w_timescalecolln = w_assgnobj.TimeScaleData("2/11/09", "2/11/09",
pjAssignmentTimescaledActualWork, pjTimescaleDays)
w_timescalecolln.Item(1).Value = 120
'Clear act work on 10th feb
Set w_timescalecolln = w_assgnobj.TimeScaleData("2/10/09", "2/10/09",
pjAssignmentTimescaledActualWork, pjTimescaleDays)
w_timescalecolln.Item(1).Clear
I am setting Actual hours for a given task assignment on a per day basis.I
read Actual start,Actual Finish and Actual hours for a given task assignment
from a text file and set it in mpp accordingly.The actual start and actual
end date is same.
I am facing a peculiar issue for following scenario:
I have a task with duration of 2 days with planned start as 10th feb and
planned end as 11th feb.Now through code I set actual work = 1hrs for 10th
feb and 2 hrs for 11 th feb.As a result Actual start for assignment is set
to 10th feb.Now I clear the actual hrs set on 10th feb.So actual hours is set
to 0 hrs for 10th feb.However I am now expecting Actual start date as 11 th
feb instead of 10th feb.
Is there any way by which I can get the desired result without actually
setting the actual start?
Below is the code snippet to reproduce the issue:
The code sets actuals for the first task and first assignment of that task
in the project.
Dim w_timescaleobj As TimeScaleValue
Dim w_timescalecolln As TimeScaleValues
Dim w_assgnobj As Assignment
'Set act work = 1 hr on 10th feb
Set w_assgnobj = MSProject.ActiveProject.Tasks(1).Assignments(1)
Set w_timescalecolln = w_assgnobj.TimeScaleData("2/10/09", "2/10/09",
pjAssignmentTimescaledActualWork, pjTimescaleDays)
w_timescalecolln.Item(1).Value = 60
'Set act work = 2 hr on 11th feb
Set w_timescalecolln = w_assgnobj.TimeScaleData("2/11/09", "2/11/09",
pjAssignmentTimescaledActualWork, pjTimescaleDays)
w_timescalecolln.Item(1).Value = 120
'Clear act work on 10th feb
Set w_timescalecolln = w_assgnobj.TimeScaleData("2/10/09", "2/10/09",
pjAssignmentTimescaledActualWork, pjTimescaleDays)
w_timescalecolln.Item(1).Clear