Application.DateDifference – Always Uses Standard Calendar

Home Forums Discussion Forum Application.DateDifference – Always Uses Standard Calendar

Viewing 0 reply threads
  • Author
    Posts
    • #413732
      Anonymous
      Inactive

      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 0 reply threads
  • You must be logged in to reply to this topic.