Copy Task Fields Macro

D

Danny

I am not a programmer and sure that I am just missing something, but...

I have read the different threads regarding task vs. resource text fields. I
understand that they are different. I went to Jack D's website and
copied/pasted the VBA into the editor. I run the macro, but nothing is
showing in my resource usage table. When I customized the field I only show
either task text or resource text. I do not see the assignment text. Am I
leaving out a step?

Thanks in advance.
 
J

JulieS

Hi Danny,

Jack's macro copies data entered into the Text5 field added to a task view
(task table for example) to the assignment Text5 field. Assignment fields
are visible in either the Task Usage or resource Usage view. In order to
see assignment fields, you need resources assigned to tasks.

So, if you:
1. Entered data into the Task Text5 field.
2. Ran Jack's macro
3. Added the Text5 field to either the the Task Usage view or Resource Usage
view you should see the data in the assignment row.

If you entered data into a field other than the task Text5 field, no data
will appear.

If you add data to the task Text5 field *after* running the macro, that
data will not appear. You will need to re-run the macro to copy the data
over again.

Perhaps if you told us specifically what you did we can assist further.

I hope this helps. Let us know how you get along.

Julie

Visit http://project.mvps.org/ for the FAQs and additional information about
Microsoft Project
 
D

Danny

Julie,

I entered a Job# in Task Text1 field, changed the code to accomodate this. I
then copied/pasted the code into the VBA editor (I am using MSP 2003 Pro). I
wish to copy this number into my Resource Usage table in order to see what
Resources are being used and how much. I am using generic resource names. I
inserted a resource Text1 field. I do not see where I can insert the
assignment text field in either "insert resource" or customize fields.
 
D

Danny

Hi Julie,

I think I see my problem. I wasn't showing the resource name, but rather the
group. What I trying to get to, in the end, is an export showing the Job#,
resource group, remaining work and some other fields that I have created in a
table in the resource usage view. There will be multiple tasks under each
job# and multiple resources also. I need to be able to export each job# with
a separate resource and remaining work to an export file. An example might
look like:

Job#, Resource, Skill code, remaining work, etc.
999-001,MET, LY,40
999-001,EET,QY,32.5
999-002,MET,LZ,82

Is this possible?

Thanks.

Danny
 
J

JulieS

Hi Danny,

Sorry for the delay in replying. I am a bit confused (trust me, nothing you
are doing -- just likely an old brain). If I understand your scenario, the
Job # are *task* based. So you have put in Job # for each task.

It sounds as though you want a list of Job Codes, the tasks under each job
code, and then the assignment information for each task (who is assigned,
what resource group is that resource from, what is that resource's skill
set, and what that assignment remaining work is.)

I would suggest starting from the Task Usage view, not the Resource Usage
view as the Job # I think is *task* based, yes?

The Job Number should already be available to you at the task level in the
Task Usage view. You could still use Jack's modified macro to copy the Job
# in Text1 to the assignment information or you could simply use the fill
handle to manually copy the Job # from each task to the assignment row
(represented by the Resource's Name under the task).

The Skill code I assume you entered as a resource field using a spare Text
field. In order for that field to show in a Task Usage view, you would need
to do some additional modification to Jack's code. Below is a quick hit
modifying the code (with huge apologies to Jack)
=====================================
Sub CopyResourceFieldToAssignments()

'This macro copies information in the Resource text2 field
'into the assignment Text3 field so that is can
'be displayed in a usage view or in a report.
'Copyright Jack Dahlgren, Feb. 2002
'Butchered by Julie, August 2006

Dim R As Resource
Dim RS As Resources
Dim A As Assignment
Set RS = ActiveProject.Resources
For Each R In RS
If Not R Is Nothing Then
For Each A In R.Assignments
A.Text3 = R.Text2
Next A
End If
Next R
End Sub
======================================

Then I would go to the Task Usage view.
Insert the Text1 field (containing the Job#)
Insert the Text3 field which should now contain the Skill set text you
entered.
Add other fields that you need such as Resource Group field.
(As an aside, I also usually add the the Outline Level field to an export so
I can quickly format the data once I get it into Excel)

It doesn't sound as thouigh you are actually looking for timescaled data, so
after modifying the Usage Table with the fields you need, you should be able
to export the data to Excel nicely using the File > Save As command and
setting the file type to Excel.

When the Export Wizard Runs, use a new map. Set the Map options to
exporting tasks and select the option for "Include Assignment rows in
output." On the Export Wizard - Task Mapping page click the "Base on Table"
button and select the Usage Table.

I don't know if this will get you *exactly* what you are searching for (it
will include more data than you list below) but based upon what I think you
are looking for, it may be a start.

I hope this helps. Let us know how you get along.

Julie

Visit http://project.mvps.org/ for the FAQs and additional information about
Microsoft Project
 
J

Jim Aksel

Also, you can use the customized grouping available on the Project Menu to
sort through these and compile in any order you desire. In doing so, I have
found one minor glitch .... when sorting, select the "Group Assignments Not
Tasks" check box.

If your sorting comes up with everything assigned to "No Value" then try
changing the sort type from Resource to Assigment in the drop down. You'll
see it if you try it. I know this is off the direct topic, but it was
mentioned in the inital post about grouping. Hope this also helps.
 
D

Danny

Hi Julie,

Sorry about my delay in responding. I was put on other tasks and haven't
been able to get back to this until now.

The direction you give about using the task view, I think may get me going
to where I need to be. We are trying to export a .csv file to MPM. I did
leave out, or more accurately had not been informed that the work information
is timescaled across month and year. I will keep you updated or come back
asking for more help if they throw me more curveballs. I think they like to
watch me solve one problem and throw another at me.

Thanks again as this information has been most helpful.

Danny
 

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