N
Natalie
Hello,
I'm trying to get the daily baseline costs for each task of a project using
TimeScaleData
It works for the first task, but starting from the second task on, I get an
exception.
My code in VB.NET looks like this:
################################
Dim tmpTimeScaleValues As MSProject.TimeScaleValues
Dim tmpTimeScale As MSProject.TimeScaleValue
Dim tmp as Double
For Each task In ActiveProject.Tasks
tmpTimeScaleValues = task.TimeScaleData(
CDate(task.BaselineStart),
CDate(task.BaselineEnd),
MSProject.PjTaskTimescaledData.pjTaskTimescaledBaselineCost,
MSProject.PjTimescaleUnit.pjTimescaleDays)
For Each tmpTimeScale In tmpTimeScaleValues
tmp = CType(tmpTimeScale.Value, Double)
....
Next tmpTimeScale
Next task
##########################
I get an exception while trying to access "tmpTimeScale.Value".
The exception says: unexpected method error (in German "unerwarteter
Methodenfehler").
As I already mentioned, it works fine for the first task, but starting from
the second task on, I get the described exception.
Any ideas?
Thank you
Natalie
I'm trying to get the daily baseline costs for each task of a project using
TimeScaleData
It works for the first task, but starting from the second task on, I get an
exception.
My code in VB.NET looks like this:
################################
Dim tmpTimeScaleValues As MSProject.TimeScaleValues
Dim tmpTimeScale As MSProject.TimeScaleValue
Dim tmp as Double
For Each task In ActiveProject.Tasks
tmpTimeScaleValues = task.TimeScaleData(
CDate(task.BaselineStart),
CDate(task.BaselineEnd),
MSProject.PjTaskTimescaledData.pjTaskTimescaledBaselineCost,
MSProject.PjTimescaleUnit.pjTimescaleDays)
For Each tmpTimeScale In tmpTimeScaleValues
tmp = CType(tmpTimeScale.Value, Double)
....
Next tmpTimeScale
Next task
##########################
I get an exception while trying to access "tmpTimeScale.Value".
The exception says: unexpected method error (in German "unerwarteter
Methodenfehler").
As I already mentioned, it works fine for the first task, but starting from
the second task on, I get the described exception.
Any ideas?
Thank you
Natalie