Formatting a Split Task

M

Micayla Bergen

I have a task which is split but i dont want both halves of the task to be
formatted the same, i.e. i want the first half coloured blue and thick, and
the second half pink and w vertical lines etc. is this possible, or if not
can i have two tasks (formatted differently) on the same line?
Many thanks
 
J

John

Micayla Bergen said:
I have a task which is split but i dont want both halves of the task to be
formatted the same, i.e. i want the first half coloured blue and thick, and
the second half pink and w vertical lines etc. is this possible, or if not
can i have two tasks (formatted differently) on the same line?
Many thanks

Micayla,
Yes it is possible to do what you want. The simplest case is with a
single split although multiple splits can be accommodated. For a single
split, a couple of spare date fields (e.g. Finish1 & Start1) need to be
populated with the Finish date of the first portion and the Start date
of the second portion. Then set up separate bar styles
(Format/Barstyles) for each portion. Use a thick blue bar from Start to
Finish1 and a pink (?) bar from Start1 to Finish.

If there are multiple splits in the bars, additional spare date fields
will need to be established as well as additional bar styles for each
portion.

The only way I know to populate the spare fields with the correct date
information for split tasks is via a VBA macro. The following code
should get you what you need.
Sub SetSplits()
For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
If t.SplitParts.Count > 1 Then
t.Finish1 = t.SplitParts(1).Finish
t.Start1 = t.SplitParts(2).Start
End If
End If
Next t
End Sub

Hope this helps.
John
Project MVP
 
J

John

JulieD said:
Hi John

v.useful (and i thought it couldn't be done!)

Cheers
JulieD

Julie,
My philosophy is that anything can be done and I have yet to run into a
case where that isn't true. It may take a lot of clever work, but it can
be done. The toughest part on this one was figuring out how to set up
the bar styles. That took a lot longer than the code.

John
 

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