List Predecessor name instead of number

T

Tim Graham

Is it possible to get Project to list the task name instead of the ID number
in the predecessor column?

Thanks
Tim Graham
 
M

Mike Glen

Hi Tim,

Welcome to this Microsoft Project newsgroup :)

Not possible, sorry :( However, if you Window/Split, you can read the names
in the lower window for each selected task.

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

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

Mike Glen
MS Project MVP
 
J

Jan De Messemaeker

Hi Tim,

Only yesterday I published a little macro in reply to an other poster (I do
hope it is an OTHER poster, I do not appreciate people who ask the same
question twice :)); it puts the predecessors' names in a text field:

Sub PredecList
dim Job as Task
dim Predec as task
dim Lis as string
for each job in activeproject.taks
if not job is nothing then
lis=""
for each predec in job.predecessortasks
if not len(lis)=0 then
lis=lis & ","
end if
lis=lis & predec.name
next predec
job.text1=predec
end if
next job
end sub

HTH
 
J

Jan De Messemaeker

Sorry Tim, I just wrote the code like that, without any testing and the
inevitable happened...
Again without testing (which you are doing very efficiently so far!) since
..text1 (or .text2) is a string variable and predec is a task, the equation
won't go

it should read
Job.text2=lis

HTH
 
T

Tim Graham

Hi Jan,

No,the "OTHER" poster wasn't me. :) I'll heed your advice on "persistence"
though.

I tried to implement the Macro by copying the commands into the VB editor.
(I hope that was what I was supposed to do) (insert sheepish grin here)
When I run the macro, I get the following error.

runtime error "438":
object doesn't support this property or method

When I select debug, the following line is highlighted
For Each Job In ActiveProject.taks

I replaced .taks with Activeproject.tasks (just guessing at this point) and
tried to run the macro again.

The next error was

runtime error "91":
Object variable or With block variable not set

Using debug, the following line was highlighted
Job.Text1 = Predec

Since I was already using Text1 in this job file, I tried replacing Text1
with Text2.(can you tell I'm still guessing?:))

After changing text1 to text2, I still received the same error message.


Due to my lack of experience with Project, I'm not sure how to proceed.

Thanks in advance for your kind efforts
Tim Graham


Thanks for making the macro available
 
J

jasonandjillbishop

Sorry Tim, I just wrote the code like that, without any testing and the
inevitable happened...
Again without testing (which you are doing very efficiently so far!) since
.text1 (or .text2) is a string variable and predec is a task, the equation
won't go

it should read
Job.text2=lis

HTH
--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
http://users.online.be/prom-ade/index.htm
32-495-300 620

Thank you for sharing this macro. I was able to make it work as well. I'ma novice with VBA. I don't suppose someone could post a version of this same script that recognizes the 255 character limit of project in a text field? Perhaps a statement that says IF result exceeds 255 characters then return text "Over character limit".
 

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