What does this mean?

B

B. Chernick

I have been trying to run Project 2003 through the interop. After some
intial setup problems, I have gotten my test project to the point where I can
create an instance of Project, load projects from SQL Server, iterate through
the Task collection, and view most of the property values of a task.

For the sake of testing I added the following line of code in the task
iteration loop: t.ActualCost =1.23

This crashes with a 'The argument value is not valid' error.

(I have also tried Cdbl(1.23) and cdbl("1.23").

The t.ActualCost Property itself displays a type of Double.

What's wrong here? Shouldn't I be able to set property values?
 
J

Jan De Messemaeker

Hi,

Look for the setting "Actual Costs are always calculated by Project" in
Tools, Options, Calculation.
If that is on, you cannot set Actual costs yourself.

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 
B

B. Chernick

Actually it's off. I should explain that I am not that familiar with Project
structure. I was just trying to see if I was able to change values
programmatically.

I will try a few other properties, hopefully ones that are always read/write.
 
B

B. Chernick

Sorry, no. This is a homegrown U.S. application for use in a U.S. factory.

My main problem is that I am still unsure what I am doing. I have quite a
bit of experience in Dot Net but absolutely nothing in writing Interop code
to control Project. While the code is still Dot Net, I can assume nothing
and I have yet to find any tutorials that remotely relate to what I am doing.
I am not sure what I'm ordered to do is possible or even practical. I don't
know if anyone has ever done anything like this.

Before my most recent system mods ( I removed Project 2000, did a 'repair'
on Office and Project 20003, and reinstalled the PIAs. ) I could not even
read the value of the properties. While there has been some improvement, I
still cannot say with certainty that my machine is set up correctly.
 

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