PS2007 Ent Custom Fields - VBA

N

NZ Projects

Is there a way to change the value of an Ent. Custom Field via VBA (PS2007) ?

TIA
 
D

Dale Howard [MVP]

NZ --

I would recommend you post this question in the
microsoft.public.project.developer newsgroup as you are more likely to get a
response there.
 
N

NZ Projects

Thanks for your replies, I found my answer:

You have to use the SetField and GetField methods. Additionally, you have
to use the FieldNameToFieldConstant method. Take a look at the following
example. Let's suppose your enterprise field name is "E_TASK_Number1" and
you want to set the value of this field for the project summary task. Your
code would look similar to:


Sub Test()

ActiveProject.ProjectSummaryTask.SetField
Application.FieldNameToFieldConstant("E_TASK_Number1"), "480"

End If

You can use the GetField method to read a property. Currently, there isn't
a way to do the same for assignments.
 
Top