質問

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

役に立ちましたか?

解決

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
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top