Cannot set the Task.ActualCost and Task.ActualWork ?

E

Eugene Rokhlin

Hi All,

I get an error 1101 'The argument value is not valid' trying to set the
ActualCost and ActualWork properties of the task

The code is as simple as that:

Set objTask = m_objActiveProj.Tasks.Add

With objTask
.Name = rs.Fields("Description")
.WBS = rs.Fields("WBS")
.ActualStart = Format(rs.Fields("dtSchedStartDate"), "dd mmm
yyyy")
.ActualFinish = Format(rs.Fields("dtSchedEndDate"), "dd mmm
yyyy")
.ActualCost = rs.Fields("mActualCost")
.ActualWork = rs.Fields("nActualHours")
End With

Other properties are set successfully.
I even tried to set ActualCost and ActualWork to some integer or variant
constants, but still get the same error.

What should I do?

P.S. I turned off "Actual Costs are always Calculated by Microsoft project"
in Tools, Option, Calculation, but this did not help so far..

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top