automatically color code task boxes in Netwk diagram

J

Jim Getz

I have specific tasks in my project plan designated by specific data in the
text 1 to text 5 columns. I would like to display each of these text fields
on the network Diagram by a different box style and background color.
 
J

John

Jim Getz said:
I have specific tasks in my project plan designated by specific data in the
text 1 to text 5 columns. I would like to display each of these text fields
on the network Diagram by a different box style and background color.

Jim,
Since you posted in the developer newsgroup, I assume you want to do
this with VBA. I did a little research of the Project object model and
came up with the BoxFormatMethod. I haven't actually tried using it, but
it looks like you should be able to set up the code to find which task
IDs are associated with which spare text field. Then use the
BoxFormatMethod to change the box style and background color for those
tasks.

Hope this helps.
John
Project MVP
 
J

Jim Getz

John,

Thanks for your quick response. I'll try this but I haven't worked with VBA
in some time. Is there some sample code out there I can use? Where can I
find more info on the BoxFormatMethod? Sorry for all the questions.

Jim
 
J

Jim Getz

John,

Thanks for your quick response. Can you point me in the right direction to
where I might find the BoxFormatMethod within Project?

Thnaks & sorry for all the questions. I haven't used VBA in some time. A
learning process, again.
 
J

John

Jim Getz said:
John,

Thanks for your quick response. Can you point me in the right direction to
where I might find the BoxFormatMethod within Project?

Thnaks & sorry for all the questions. I haven't used VBA in some time. A
learning process, again.

Jim,
No problem will "all the questions", that's what we are here for.
Between your two posts, I detect three questions.

First, to see the syntax for any of Project's VBA statements, go to
Tools/Macro/Visual Basic Editor. When the editor window appears you may
or may not need to hit the Object Browser icon, depending on whether the
editor opened with the browser active or with a code window. In the
upper left side of the object browser window you will see two selection
boxes. The top box allows you to select which object library you want to
search. You should pick "MSProject". The bottom box is where you can
type the object, property, method, etc. you want to look at. In this
case, type in BoxFormat and hit the search icon (binoculars). The search
results will be displayed in the middle of the window. In this case you
will see two results - BarBoxFormat and BoxFormat. Select the BoxFormat
and hit the question mark icon. That will bring up the VB Help file with
the complete syntax for the BoxFormat Method.

Second, for a good source of sample Project VBA code, go to fellow MVP,
Jack Dahlgren's website at: http://masamiki.com/project/macros.htm

Third, and you didn't specifically ask this, but if you are interested
in a refresher on Project VBA, go to our MVP website at:
http://www.mvps.org/project/links.htm
At the bottom of the page you will find a link to "Project 98 Visual
Basic Environment Training Materials". Even though it says it is for
Project 98, it is equally applicable to all current versions of Project.
The only real difference is that each new version of Project adds more
"stuff" to the Project object model.

Hope this helps.
John
Project MVP
 

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