How to set task type of a task in MS Project using excel vba code. RRS feed

  • Question

  • Hello Gurus,

    I am generating MS Project files(.mpp) files form excel data. An excel macro in the excel file will read the excel data and will generate the .mpp file. It is working fine. now i want to set the task type of all the tasks to "Fixed work" from excel vba code.

    How to use the property PjTaskFixedType in setting the task type??

    refer below links

    Can someone help me in setting task type property from excel vba.

    I have attached my sample code used to generate the mpp file. It is not the complete code but you will get an idea from it.

    Set pjApp = CreateObject("MSProject.Application")
    Set newproj = pjApp.ActiveProject
    newproj.Tasks.Add (task_name)
    newproj.Tasks(mpp_row_number).Start = task_start_date
    newproj.Tasks(mpp_row_number).Finish = task_end_date
    newproj.Tasks(mpp_row_number).ResourceNames = resource_name
    pjApp.FileSaveAs mpp_file_save_path & mpp_file_name & ".mpp"

    Any help is appreciated.

    Wednesday, October 29, 2014 2:21 PM


All replies