Elapsed Duration?

R

Robert

Hello,

How is it possible to test in a formula and/or in a VBA proc if the duration
of the task is elapsed vs. working days?
Thanks for your help

Robert
 
G

Gérard Ducouret

Hi,
A VBA procedure can do that. Please find a sample of such a macro (which has
to be improved).
Gérard Ducouret

Sub Elapsed_Duration()
Dim S As Date
Dim F As Date
S = ActiveCell.Task.Start
F = ActiveCell.Task.Finish
If Application.DateDifference(S, F, ActiveProject.BaseCalendars("Standard"))
/ (ActiveProject.HoursPerDay * 60) < (ActiveCell.Task.Duration / 480) Then
MsgBox "Task with elapsed duration"
Else
MsgBox "Task with working days duration"
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top