Loading...
Quick Links

Application.DateDifference – Always Uses Standard Calendar

Home Forums Discussion Application.DateDifference – Always Uses Standard Calendar

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #413732 Reply

    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

Viewing 1 post (of 1 total)
Reply To: Application.DateDifference – Always Uses Standard Calendar
Your information: