Display Pred/Successor name

S

Saviz

Hi,

Is there a way to display Pre/Succ name in a field?

(I am not after the pre/successor)

Eg have a task A's successor name displayed in say Text1.
 
J

John

Saviz said:
Hi,

Is there a way to display Pre/Succ name in a field?

(I am not after the pre/successor)

Eg have a task A's successor name displayed in say Text1.

Saviz,
Sure, but it will require some VBA code to do it and it could get a bit
messy if there are multiple predecessors or successors for each task.

In a simple form, the following code will put the predecessor task name
in spare task Text9. It also will skip tasks with multiple predecessors.
Handling multiple predecessors can be done but it gets more complex.

Sub pred_name()
For Each t In activeproject.Tasks
If Not t Is Nothing Then
If t.Predecessors <> "" And InStr(t.Predecessors, ",") = 0 Then
t.Text9 = activeproject.Tasks(CInt(t.Predecessors)).Name
End If
End If
Next t
End Sub

John
Project MVP
 
M

Mike Glen

Hi Saviz,

Welcome to this Microsoft Project newsgroup :)

Not without some vba. On the other hand, if you work from the Gantt Chart
view and then Window/Split, you can see the predecessors' names in the
bottom pane. Furthermore, if you right click in the bottom pane you can
select it to show both predecessors and successors.

FAQs, companion products and other useful Project information can be seen at
this web address: http://project.mvps.org/faqs.htm

Hope this helps - please let us know how you get on :)

Mike Glen
MS Project MVP
See http://tinyurl.com/2xbhc for my free Project Tutorials
 

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