K Major said:
John,
Thanks - a couple of questions.
1) I saw text1, text2, etc. fields in the assignment table (when creating an
export map) - can you customize these fields? If so, how do you get info
into them? Can you tie them back to the actual tasks each assignment relates
to?
2) On the VBA topic - is there a sequence number that you use to tie each
record in each table together so the right records go with the right records?
Thanks, Kevin
(just like in Tasks and Resources).
Kevin,
First understand that Tasks, Resources and Assignments all have spare
fields but those spare fields are not the same. In other words, Task
Text1 is not the same as Resource Text1 or Assignment Text1. Task and
Resource spare fields can be customized (e.g. insert a formula or value
list) but Assignment spare fields cannot. As far as putting data into a
spare Assignment field it is probably more easily explained with an
example. Go to the Resource or Task Usage view. Insert Text1. For the
Resource (or Task) rows, the spare field is the Resource (or Task) Text1
field. For the Assignment rows, the spare field is Assignment Text1
When working with VBA, there are generally no "tables" involved. Rather
VBA code is used to access Project objects and their properties directly
whether the object is a Task object, Resource object or Assignment
object. For example the collection of Task objects is:
ActiveProject.Tasks
The collection of Resource objects is:
ActiveProject.Resources
And, the collection of Assignment objects for Task 1 is:
ActiveProject.Tasks(1).Assignments
There are many ways to gather the needed data from Project for exporting
to Excel (or other VBA compatible application). It all depends on what
you want/need to do.
If you are interested in learning more about VBA, go to the MVP website
at:
http://www.mvps.org/project/links.htm
At the bottom of the page you will find a link for "Project 98 Visual
Basic Environment Training Materials". Even though it says it is for
Project 98, the training materials are equally applicable to all current
versions of Project. The only real difference is that later versions of
Projects have enhanced the functionality (i.e. more objects in the
object library).
For several examples of VBA code, go to Jack Dahlgren's website at:
http://masamiki.com/project/macros.htm
One of his macros (export hierarchy to Excel) demonstrates export of
Project data to Excel.
Hope this helps.
John
Project MVP