![]() ![]() Hello again! So I think I managed to make something, thanks to your code, and some more thinking. ![]() MsgBox "An error occurred - " & Err.Number & " - " & Err.Description MsgBox MyStart & " - " & MyEnd & " - " & DateDiff("s", MyStart, MyEnd) & " sec" If T.Assignments(1).ResourceName = RList(i) ThenĪpplication.TaskOnTimelineEx TaskID:=T.ID, BarIndex:=i 'Check all assignments of a task (case of several resources for one task)Īpplication.TaskOnTimelineEx TaskID:=T.ID, BarIndex:=0Īpplication.TaskOnTimelineEx TaskID:=T.ID, BarIndex:=MoreAssn 'Application.TaskOnTimeline TaskID:=T.ID, Remove:=True TimelineBarSetLabel TimelineLable:="Tasks assigned to " & RList(i), BarIndex:=i TimelineBarSetLabel TimelineLable:=RList(0), BarIndex:=0 'First bar, no assignments 'Create the timeline bars for each resource RList = RList & "," & "multiple assignments" 'Last Bar 'And configure Timeline bars names for each resource 'Prepare Resource list for assignment check 'Remove task first from remaining TimeLineBar, since assignments may have been changedĪpplication.TaskOnTimeline TaskID:=T.ID, Remove:=True 'Remove old TimelineBars - can' find a count so assume enough TimeLineBarsįor i = P.ResourceCount + 20 To 1 Step -1 'Ensure that Screenupdating is enabled even in case of error ![]() WindowActivate Windowname:=P, TopPane:=False Application.OpenUndoTransaction "Add tasks to TimeLineBars" ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |