Problem writing EnterpriseProject Numbers from VBA

B

Bob Segrest

I would like to store data in one or more of the enterprise project number
fields.

I can read these fields easily. For example,

temp = ActiveProject.Tasks(1).EnterpriseProjectNumber39

However when I try to store a value in the same field

ActiveProject.Tasks(1).EnterpriseProjectNumber39 = 96

I receive a run time error 1101 message indicating "The argument value is
not valid".

According to the documentation this should be a read/write field.

Any ideas?

Bob Segrest
 
J

John

Bob Segrest said:
I would like to store data in one or more of the enterprise project number
fields.

I can read these fields easily. For example,

temp = ActiveProject.Tasks(1).EnterpriseProjectNumber39

However when I try to store a value in the same field

ActiveProject.Tasks(1).EnterpriseProjectNumber39 = 96

I receive a run time error 1101 message indicating "The argument value is
not valid".

According to the documentation this should be a read/write field.

Any ideas?

Bob Segrest
Bob,
Are your using Project Professional 2003 or Project Standard 2003? This
property is only available in the Professional version. I have the
standard version and I get the exact same runtime error.

John
 
B

Bob Segrest

I am running Project 2003 Professional connected to a Project Server 2003
system.

Note that I can read data (stored by other means) from these fields.

Whatever I am doing wrong, I get the same result on more than one set of
systems.

Still stuck..........

Bob Segrest
 
B

Bob Segrest

Hi Lars,

Thank you for the tip. I tried the following line:

ActiveProject.Tasks.Item(1).SetField pjTaskEnterpriseProjectNumber39,
Str(iScore)

But I am still receiving the same error.

Any more ideas? Does my syntax look correct?

Bob Segrest
 
J

JackD

I can't check it out for you since I'm not using that version of project,
but looks like it should work.

Do you have an actual value for iScore? An empty value would cause an error.
 

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