Reputation: 1216
Looking for how to change/update values in enterprise custom fields using VBA in MSProject2010.
sofar i tried below snippet but with error : "application defined or object defined error"
For Each prTask In prProject.Tasks
prTask.SetField(FieldNameToFieldConstant("EntCustField"), "value") any
Next
what i am doing wrong or any other way ?
Thanks
Upvotes: 0
Views: 2386
Reputation: 8442
Separating finding the field code from setting the value might help isolate the error:
Dim prTask As Task
Dim fldCode As Long
fldCode = FieldNameToFieldConstant("EntCustField")
For Each prTask In prProject.Tasks
prTask.SetField fldCode, "value"
Next
Upvotes: 1