Sorting (eg by start date) keeping outline levels?

M

Mahameru

My org is small and mainly uses MSP as a scheduling tool. We have the one
master schedule, with all of the different programs broken down in that
schedule. An example of what the task namecolumn looks like:
Flores Trip – Preparation
Transport and Accommodation
Book Denpasar to Kupang, 2 people for 31/4/08
Book Kupang to Maumere, 3 people for 4/5/08
Admin.
Prepare 2 x field folders
Call Cooperative X to advise of date and location of training
Find Map of Maumere and add to folder
prepare 21 copies of training materials
Flores Trip – Fieldtrip
Transport
Denpasar to Kupang
Kupang to Maumere
Maumere to Village X
Timor Trip – Preparation
Transport and Accommodation
Book Denpasar to Kupang, 2 people for 31/4/08
Book Kupang to Denpasar, 3 people for 4/5/08
Admin.
Prepare 2 x field folders
Find Map of Kupang and add to folder
Print 45 copies of training materials
Timor Trip – Fieldtrip
Transport
Denpasar to Kupang
Kupang to Denpasar
Activities
Kupang - Bookkeeping training
Kupang – Confirm flight to Maumere
Kupang – Organize driver for maumere to village Y.

I have been trying to create different views for the information so that the
tasks can be sorted by date and by resosrce. The problem is, how do you do it
so that the different outline levels are kept? Now if I sort the info, for
eg, by what the admin team have to do, I only get a list that looks like this
(assume all 4 tasks have the same start date):

Prepare 2 x field folders
Prepare 2 x field folders
Print 45 copies of training materials
Print 21 copies of training materials

The problem is that I need a column in the reports or different views that
says whether the task is for the Timor or Flores trip. Is a way this can be
automatically generated, or can each task be listed by both levels?
Timor trip-preparation
Prepare 2 x field folders
Flores trip - preparation
Prepare 2 x field folders
Timor trip-preparation
Print 45 copies of training materials
Flores trip - preparation
Print 21 copies of training materials,

Or even better

Timor trip-preparation
Prepare 2 x field folders
Print 45 copies of training materials
Flores trip - preparation
Prepare 2 x field folders
Print 21 copies of training materials

Thanks,
Kate
 
M

Mahameru

I just found the summary name column in the resource usage view I have
created, but unfortunately it is not useful as I want the next highest
outline level, the top task summary name to appear (Ie Flores Trip -
preparation) not the one that appears in the summary name field (transport).

Actually - I now think that what I need to do is create a custom field in
the Gantt chart view where I can write the main task summary name next to
each task, and then apply some sort of VBA code so that the same info
automatically populates in my resource usage view. The first problem with
this is that I have no idea how to do the VBA stuff (!), and looking at some
of the links provided about VBE in other posts has only confused me more. The
second problem is that I have found several different codes via the forum to
solve this problem, so when I do find out how to copy and paste a code into
VBE I don;t know which code to use.

The field I would be using in the Gantt chart view is Text4, so I would like
Text4 from task info to populate in Text4 in Resource usage view.

So what code do I use and what do I do with the code once I've got it?

Thanks
Kate
 
J

JulieS

Hello Kate,

My comments are inline.

Julie

Mahameru said:
I just found the summary name column in the resource usage view I
have
created, but unfortunately it is not useful as I want the next
highest
outline level, the top task summary name to appear (Ie Flores Trip -
preparation) not the one that appears in the summary name field
(transport).

Actually - I now think that what I need to do is create a custom
field in
the Gantt chart view where I can write the main task summary name
next to
each task, and then apply some sort of VBA code so that the same
info
automatically populates in my resource usage view. The first problem
with
this is that I have no idea how to do the VBA stuff (!), and looking
at some
of the links provided about VBE in other posts has only confused me
more. The
second problem is that I have found several different codes via the
forum to
solve this problem, so when I do find out how to copy and paste a
code into
VBE I don;t know which code to use.

[Julie] FAQ # 37 at http://project.mvps.org/faqs.htm contains two
pieces of code. The first piece is for Project 2003 or earlier and,
with some very minor modification, should work for your needs.
The field I would be using in the Gantt chart view is Text4, so I
would like
Text4 from task info to populate in Text4 in Resource usage view.

[Julie] In the first portion of code noted in FAQ # 37, you'll need to
change references to Text1 to Text4. Copied below is the code with
the modifications you need:

Sub TransferTaskText4ToAssignmentText4()
Dim t As Task
Dim a As Assignment
On Error Resume Next
For Each t In ActiveProject.Tasks
For Each a In t.Assignments
a.Text4 = t.Text4
Next a
Next t
End Sub
So what code do I use and what do I do with the code once I've got
it?

[Julie] First experiment on a copy of your project :) Open the
project file and press ALT + F11 to open the Visual Basic editor.
Make sure the Project explorer window (Should say Project - VBA
Project in the title bar) is visible, if not choose View > Project
Explorer. In the Project explorer window may sure you have the
"ThisProject" object selected. Choose Insert Module to add a VBA
module to the project file. Once you've inserted the module, copy and
paste the code from above -- starting at Sub
TransferTaskText4ToAssignmentText4() all the way through the End Sub.

Save the project file. In the menu in the VBE, choose File > Close
and return to Microsoft Project to close the VBE. Once back in your
project, choose Tools > Macro > Macros. You should see the
"TransferTaskText4toAssignmentText4: macro in the list. Select the
macro and click the Run button. Switch to the Resource Usage view,
add Text4 and you should be all set.
Thanks
Kate
<snip>
I hope this helps Kate. Let us know how you get along.

Julie
Project MVP
 
M

Mahameru

Hooray!
It works. Thanks very much JulieS.
--
New to MSP
MS Project 2003


JulieS said:
Hello Kate,

My comments are inline.

Julie

Mahameru said:
I just found the summary name column in the resource usage view I
have
created, but unfortunately it is not useful as I want the next
highest
outline level, the top task summary name to appear (Ie Flores Trip -
preparation) not the one that appears in the summary name field
(transport).

Actually - I now think that what I need to do is create a custom
field in
the Gantt chart view where I can write the main task summary name
next to
each task, and then apply some sort of VBA code so that the same
info
automatically populates in my resource usage view. The first problem
with
this is that I have no idea how to do the VBA stuff (!), and looking
at some
of the links provided about VBE in other posts has only confused me
more. The
second problem is that I have found several different codes via the
forum to
solve this problem, so when I do find out how to copy and paste a
code into
VBE I don;t know which code to use.

[Julie] FAQ # 37 at http://project.mvps.org/faqs.htm contains two
pieces of code. The first piece is for Project 2003 or earlier and,
with some very minor modification, should work for your needs.
The field I would be using in the Gantt chart view is Text4, so I
would like
Text4 from task info to populate in Text4 in Resource usage view.

[Julie] In the first portion of code noted in FAQ # 37, you'll need to
change references to Text1 to Text4. Copied below is the code with
the modifications you need:

Sub TransferTaskText4ToAssignmentText4()
Dim t As Task
Dim a As Assignment
On Error Resume Next
For Each t In ActiveProject.Tasks
For Each a In t.Assignments
a.Text4 = t.Text4
Next a
Next t
End Sub
So what code do I use and what do I do with the code once I've got
it?

[Julie] First experiment on a copy of your project :) Open the
project file and press ALT + F11 to open the Visual Basic editor.
Make sure the Project explorer window (Should say Project - VBA
Project in the title bar) is visible, if not choose View > Project
Explorer. In the Project explorer window may sure you have the
"ThisProject" object selected. Choose Insert Module to add a VBA
module to the project file. Once you've inserted the module, copy and
paste the code from above -- starting at Sub
TransferTaskText4ToAssignmentText4() all the way through the End Sub.

Save the project file. In the menu in the VBE, choose File > Close
and return to Microsoft Project to close the VBE. Once back in your
project, choose Tools > Macro > Macros. You should see the
"TransferTaskText4toAssignmentText4: macro in the list. Select the
macro and click the Run button. Switch to the Resource Usage view,
add Text4 and you should be all set.
Thanks
Kate
<snip>
I hope this helps Kate. Let us know how you get along.

Julie
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