VBA test on gantt bar format

R

renevada

Hello everybody,

First post on this forum.

I am just starting in VBA for MS project but I have a small experience
with VBA for Excell & Access as a occasional user who like to automate
some actions.

We are using a lot the reported tasks function on the summary bars, but
their formatting is painfull either its one style for all or its needs
to be formatted one by one... I am looking automating this process.
Basically I want to copy the format (limited to corlor and shape) of the
actual bar on the reported bar.

I made a few reseach and more or less found ou wich fields needs to be
modified (I love the record macro functionality...) and I intend to make
look on all selected tasks (for each task in ....), test if the
"reported" is set on yes/true and copy the format to the reported bar

But I am having trouble finding how to code getting the actual color
(MiddleColor) of the bar. seems trivial... Yes I am new at MSP vba,
searched the forum and the internet fro vba exples but I haven't found
anything...
 
J

John

renevada said:
Hello everybody,

First post on this forum.

I am just starting in VBA for MS project but I have a small experience
with VBA for Excell & Access as a occasional user who like to automate
some actions.

We are using a lot the reported tasks function on the summary bars, but
their formatting is painfull either its one style for all or its needs
to be formatted one by one... I am looking automating this process.
Basically I want to copy the format (limited to corlor and shape) of the
actual bar on the reported bar.

I made a few reseach and more or less found ou wich fields needs to be
modified (I love the record macro functionality...) and I intend to make
look on all selected tasks (for each task in ....), test if the
"reported" is set on yes/true and copy the format to the reported bar

But I am having trouble finding how to code getting the actual color
(MiddleColor) of the bar. seems trivial... Yes I am new at MSP vba,
searched the forum and the internet fro vba exples but I haven't found
anything...

renevada,
Welcome to the world of Project VBA.

It's not quite clear to me whether you are trying to read the bar format
or trying to set the bar format. If you are trying to read the format
you are out of luck. Project does not make format property information
available. You can however set the format using the GanttBarStyleEdit
Method. Look in the VBA help file for syntax specifics.

Hope this helps.

John
Project MVP
 
M

Mike Glen

Hi renevada,

Try posting on the microsoft.public.project.developer newsgroup (forum).
Please see FAQ Item: 24. Project Newsgroups. FAQs, companion products and
other useful Project information can be seen at this web address:
http://project.mvps.org/faqs.htm

Mike Glen
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