Jack's macro - export predecessors?

J

James

Hi,

Firstly, thanks Jack for a great VBA macro! I've used VBA with Access, but
never with Project and Excel, and this has been a great help to me in
exporting MSP data into Excel.

I can see how I can easily change the code to add and remove fields from the
export. However, I would like to export the Predecessor field so that my team
can see the dependancies for their tasks.

I cannot see predecessors in the list that appears when I type "asgn." Is
this field available to extract? Or is there another method for this?

Thanks in advnace for any help!
James.
 
J

John

James said:
Hi,

Firstly, thanks Jack for a great VBA macro! I've used VBA with Access, but
never with Project and Excel, and this has been a great help to me in
exporting MSP data into Excel.

I can see how I can easily change the code to add and remove fields from the
export. However, I would like to export the Predecessor field so that my team
can see the dependancies for their tasks.

I cannot see predecessors in the list that appears when I type "asgn." Is
this field available to extract? Or is there another method for this?

Thanks in advnace for any help!
James.

James,
That's because the Predecessors field is a task object property, not an
assignment object property. You will need to add the predecessors to the
"For Each t ..." loop and not in the "For each Asgn ..." loop.

Hope this helps.
John
Project MVP
 
J

James

Thanks John, I'll have a little play.

James. :)

John said:
James,
That's because the Predecessors field is a task object property, not an
assignment object property. You will need to add the predecessors to the
"For Each t ..." loop and not in the "For each Asgn ..." loop.

Hope this helps.
John
Project MVP
 
J

James

Thanks for your pointers, they really helped.

I now have a report that exports straight from Project without any seond
touching. I played around with the location of the "dwn" function, and added
in a variable count within the 'Each Asgn' loop, so that it puts task details
in one row only, and then adds in the resources in following lines as per
Jack's original.

I have also added in a sub routine for some extra formatting. This was a
Macro developed in Excel, but required a save, close and open before it
worked. I copied the code into project and get two for one. The only thing I
cannot get it to do is to freeze panes. The command for the excel macro
doesn't work in the project code.

But this will still keep my team happy!

Thanks again!
James :D
 

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