문제

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