Home › Forums › Microsoft Project Discussion Forum › Application.DateDifference – Always Uses Standard Calendar
Hello,
I have written some VBA to assign percent complete to Text1.
Select Case taskRes
Case “FiveDaysAWeek”
oSubTask.Text1 = CInt(((Application.DateDifference(taskStart, Now(), FiveDaysAWeek) / taskDuration) * 100)) & “%”
Case “SevenDaysAWeek”
oSubTask.Text1 = CInt(((Application.DateDifference(taskStart, Now(), SevenDaysAWeek) / taskDuration) * 100)) & “%”
End Select
The calculation for FiveDaysAWeek is correct but for SevenDaysAWeek calendar it still calculates the difference based on working 5 days a week and not 7.
Any input on what I am doing wrong would be appreciated.
Craig