locked
using Double quotes in ms project VBA RRS feed

  • Question

  •    

    I am trying to set the custom feilds in ms project, but my formula in the formulae wont set by vba, i have to set each one manually, this is a bind when i have 50 or so projects each with the same feild...

    CustomFieldRename FieldID:=pjCustomTaskText2, NewName:="MS Name & Fin"
        CustomFieldSetFormula FieldID:=pjCustomTaskText2, Formula:="[Text1] " & " - " & " Format([Scheduled Finish],dd/mm)"
        '[Text1] & "-" & Format([Scheduled Finish],dd/mm)
        CustomFieldPropertiesEx FieldID:=pjCustomTaskText2, Attribute:=pjFieldAttributeFormula, SummaryCalc:=pjCalcNone, GraphicalIndicators:=False, AutomaticallyRolldownToAssn:=False

    the quotes wont set even when i substitute them for single quotes,'-' or double up the quotes ""-""

    any clues?

    thanks

     

    Phil Monckton The Happy Planner

    Wednesday, January 29, 2014 11:39 AM

All replies

  • the formula I want to use is

    [Text1] & " " & Format([Scheduled Finish],"dd/mm")


    Phil Monckton The Happy Planner

    Wednesday, January 29, 2014 11:45 AM
  • ah i found it

    double quotes does work, but you have to put them on all quotes

    so answer is

    [Text1] & "" "" & Format([Scheduled Finish],""dd/mm"")



    Phil Monckton The Happy Planner

    Wednesday, January 29, 2014 11:49 AM