none
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

    http://msdn.microsoft.com/en-us/library/office/ff861713.aspx

    http://msdn.microsoft.com/en-us/library/office/ff864157.aspx

    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")
    pjApp.FileNew 
    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"
    pjApp.FileClose
    pjApp.Quit

    Any help is appreciated.




    Wednesday, October 29, 2014 2:21 PM

Answers

All replies