Project VBA run-time error '1004', Adding formula into custom field in macro RRS feed

  • Question

  • I have recorded a macro in MS Project 2010 but it comes up with an error when I try to play it.


    When I perform these steps manually everything works fine.


    What I am trying to do is to modify a custom field and add a formula in it,


    The formula I am putting in the field is to look in the task description and put a number referencing that task into the custom field, once I have the numbers in that field I can sort that field to make the tasks go in order I require.


    the macro is as follows:



        CustomFieldSetFormula FieldID:=pjCustomTaskText4, Formula:="iif(instr(1,[name],serv),1,2)"

        CustomFieldPropertiesEx FieldID:=pjCustomTaskText4, Attribute:=pjFieldAttributeFormula, SummaryCalc:=pjCalcNone, GraphicalIndicators:=False, AutomaticallyRolldownToAssn:=False

    Monday, June 17, 2013 5:03 AM

All replies

  • This post has been answered by the following:


    Monday, June 17, 2013 9:52 PM