D
draco664
Greetings all,
I have a project which uses several custom text fields for different
things. However, the specified text fields may change at a later
stage, when the new scheduling standards are released, so I want to
just change a constant to identify the field.
I'm trying to write some code that will assign a value to one of the
text fields, which is identified within the code.
I've tried using the getfield function, but I get the compile error
"Function call on left-hand side of assignment must return Variant or
Object."
For example.
' defining constants representing fields
Const CodeFile_ReleaseField = pjCustomTaskText2
Const CodeFile_TeamField = pjCustomTaskText3
' then later within the code
activeproject.tasks(i).getfield(CodeFile_ReleaseField) = "Release 1"
activeproject.tasks(i).getfield(CodeFile_TeamField) = "Build Team"
Any ideas?
I have a project which uses several custom text fields for different
things. However, the specified text fields may change at a later
stage, when the new scheduling standards are released, so I want to
just change a constant to identify the field.
I'm trying to write some code that will assign a value to one of the
text fields, which is identified within the code.
I've tried using the getfield function, but I get the compile error
"Function call on left-hand side of assignment must return Variant or
Object."
For example.
' defining constants representing fields
Const CodeFile_ReleaseField = pjCustomTaskText2
Const CodeFile_TeamField = pjCustomTaskText3
' then later within the code
activeproject.tasks(i).getfield(CodeFile_ReleaseField) = "Release 1"
activeproject.tasks(i).getfield(CodeFile_TeamField) = "Build Team"
Any ideas?