M
Mirella Haro
Hi everyone, I have a recent problem with my VB6 project.
A few days ago I upgraded my MsProject from 2003 to 2007 and now
because of that my project has stop working, specific in the
TimeScaleData function when I try to export some information.
This is the code I'm working with right now:
iRes = m_iFindResourceID(Task.ResAssigns.aResAssign(I).lResourceID)
Set PrjAssign =
PrjTask.Assignments.Add(ResourceID:=m_Resources.aResource(iRes).lPrjResID)
'-- Apply monthly values
PrjAssign.Work = 0
Set PrjTSV = PrjAssign.TimeScaleData(PrjTask.Start, PrjTask.Finish,
pjAssignmentTimescaledWork, pjTimescaleMonths)
For iPeriod = 1 To Task.nDuration
If Not IsEqualDouble(.adblWork(iPeriod), 0) Then
If PrjAssign.ResourceType = pjResourceTypeWork Then
PrjTSV(iPeriod).Value = m_dblHrsToMin(.adblWork(iPeriod))
End If
End If
Next
Reviewing my VB code I noticed that the problem is in the date parameter
that I'm sending in the TimeScaleData function. This because the
"PrjAssign.Work = 0" line that is setting my StartDate equals to my EndDate.
Anyone knows why is this happening?
If I erase the "PrjAssign.Work = 0" line my TimeScaleData function works
fine because my StartDate has the value that must have, but with this I'm
getting the "The argument value is not valid" error.
Anyone can help me with this!?
Thanks.
A few days ago I upgraded my MsProject from 2003 to 2007 and now
because of that my project has stop working, specific in the
TimeScaleData function when I try to export some information.
This is the code I'm working with right now:
iRes = m_iFindResourceID(Task.ResAssigns.aResAssign(I).lResourceID)
Set PrjAssign =
PrjTask.Assignments.Add(ResourceID:=m_Resources.aResource(iRes).lPrjResID)
'-- Apply monthly values
PrjAssign.Work = 0
Set PrjTSV = PrjAssign.TimeScaleData(PrjTask.Start, PrjTask.Finish,
pjAssignmentTimescaledWork, pjTimescaleMonths)
For iPeriod = 1 To Task.nDuration
If Not IsEqualDouble(.adblWork(iPeriod), 0) Then
If PrjAssign.ResourceType = pjResourceTypeWork Then
PrjTSV(iPeriod).Value = m_dblHrsToMin(.adblWork(iPeriod))
End If
End If
Next
Reviewing my VB code I noticed that the problem is in the date parameter
that I'm sending in the TimeScaleData function. This because the
"PrjAssign.Work = 0" line that is setting my StartDate equals to my EndDate.
Anyone knows why is this happening?
If I erase the "PrjAssign.Work = 0" line my TimeScaleData function works
fine because my StartDate has the value that must have, but with this I'm
getting the "The argument value is not valid" error.
Anyone can help me with this!?
Thanks.