none
MsProject Pro 2013 - TimeScaleData not writing correctly RRS feed

  • Question

  • The issue is when I have to update material work on an assignment that has already data, ie, what I mean is let say that I have previously update one assignment from nov 24 to dec 16 and now I want to update the project using the following VBA code.

    ActiveProject.Tasks.UniqueID(4).Assignments.UniqueID(1048578).TimeScaleData(StartDate:="12/19/17 12:00 AM", EndDate:="12/31/17 12:00 AM", Type:=10, TimeScaleUnit:=4, Count:=13).Item(1).Value = "130"

    The code should tell ms project to put 10 units of the material resource for the next 13 days starting on 12/19 ending on 12/31 (13 days).

    However, for some reason it does not work, the ms project starts writing the first value way before the <g class="gr_ gr_17 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="17" id="17">startdate</g> defined on the code.

    If you see on “picture 1 before running” the actual work finishes on Saturday 16, after running the ms project starts writing on Dec 15 (picture 2 after running), several days before the one defined on the code that is Dec 19.

    However, if I create a for and write day by day it works. But, since I have to update several tasks (like 100) if I have to update day by day of each one of them the time consuming would be huge. If the ms projects write once for each task the time would be few seconds.

    Has anyone faced this issue and could give some clues?

    Thanks.

    Picture1. (before running the code)

    Picture2. After running the code


    PL

    Thursday, November 23, 2017 5:36 PM

All replies