Reading "split-times"

M

Mark Meyer

Hi,

I'm wondering whether it's possible to find out, if a task is currently
running: Comparing the actual date with StartDate and EndDate of the
task would be the easy way - but in case the task was split this
wouldn't cover the time while a task is paused (...)

TASK |==========............==========|



Is there a way to access these data from within a VBA Makro - or do one
have to check the assigned ressources for each day (if so - how is this
done best).

Kind regards,

Mark
 
J

JackD

Task.Splitparts.count will tell you if the task is split or not.
If it is split then you can find the start/finish of the split parts and see
if any of them cover the current date

maybe something like this

Sub splits()
For Each Task In ActiveProject.Tasks
If Task.SplitParts.Count > 1 Then
For Each SplitPart In Task.SplitParts
If SplitPart.Finish >= Date And SplitPart.Start <= Date Then
MsgBox Task.Name & " is currently running"
End If
Next SplitPart
End If
Next Task
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