Fuield name woes

Q

qefd

I am trying to use the following code to export data into excel. All goes
well untill I try to add a field. I want to export the predecessor field but
I can't find a reference for it. Is there a listing of all the fileds in
Project? Where can I get it?

ANy ideas?
Thanks

For Each Asgn In T.Assignments
Set xlRow = xlRow.Offset(0, 0)
Set xlCol = xlRow.Offset(0, Columns)
Set xlCol = xlCol.Offset(0, 1)
xlCol = (Asgn.Work / 480) & " Days"
Set xlCol = xlCol.Offset(0, 1)
xlCol = (Asgn.ActualWork / 480) & " Days"
Set xlCol = xlCol.Offset(0, 1)
xlCol = Asgn.LinkPredecessors =======> causes an error
Next Asgn
 
J

John

qefd said:
I am trying to use the following code to export data into excel. All goes
well untill I try to add a field. I want to export the predecessor field but
I can't find a reference for it. Is there a listing of all the fileds in
Project? Where can I get it?

ANy ideas?
Thanks

For Each Asgn In T.Assignments
Set xlRow = xlRow.Offset(0, 0)
Set xlCol = xlRow.Offset(0, Columns)
Set xlCol = xlCol.Offset(0, 1)
xlCol = (Asgn.Work / 480) & " Days"
Set xlCol = xlCol.Offset(0, 1)
xlCol = (Asgn.ActualWork / 480) & " Days"
Set xlCol = xlCol.Offset(0, 1)
xlCol = Asgn.LinkPredecessors =======> causes an error
Next Asgn

qefd,
Your code generates an error because assignments don't have
Predecessors, Tasks do. So it looks like your last line of code should
be:
xlCol = T.Predecessors

Hope this helps.
John
 

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