splitted line over a task

S

slav

Hello,
I am using Project 2003 Pro.
I need to show a splitted line over a task in the gantt view.
I use Start1, Finish1 and Flag1 to define the beginning and ending of the
line:

ActiveProject.Tasks(x).Start1 = "1.FEB.2009"
ActiveProject.Tasks(x).Finish1 = "28.FEB.2009"
ActiveProject.Tasks(x).Flag1 = 1

The splits may be more than 10, so I am not able to use only the Startn,
Finishn fields.

In the gantt view I am adding additional bar style to show this additional
line.
I am able to split the line manualy (in many parts), but I didn't find the
way to do it in VBA.
Thanks in advance
 
R

Rod Gill

I recorded a macro of me splitting a task manually three times and got:

ActiveProject.Tasks(1).Split StartSplitOn:="4/03/09 8:00 a.m.",
EndSplitOn:="6/03/09 8:00 a.m."
ActiveProject.Tasks(1).Split StartSplitOn:="9/03/09 8:00 a.m.",
EndSplitOn:="11/03/09 8:00 a.m."
ActiveProject.Tasks(1).Split StartSplitOn:="16/03/09 8:00 a.m.",
EndSplitOn:="17/03/09 8:00 a.m."


--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
S

slav

Hello Rod,
I don't want to split the task, but the additional line that is shown with
Start1, Finish1 and Flag1 properties. I even doesn't know how to call it - I
think it is not a task, but should be task property.
I have also tried to record a macro, but it doesn't contain anything about
this additional line.
I also tried to save the project in XML format, but the splits of this
additional line does not exists there. Opening back the XML file shows the
whole line without the splits.

Slav.
 
R

Rod Gill

Sorry, I'm afraid your description doesn't make sense for me. There is no
out of the box line that shows Start1 Finish1 etc. If you have one, someone
set it up for you. See Format, Bar Styles and there you can create a new bar
that shows anything you like.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
S

slav

Hello Rod,
I am afraid you didn't read the last part of my first post. I am adding
new bar and I am able to split it manually. The question is how to split it
in VBA?

Slav.
 

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