referencing Enterprise fields

Q

qed

I want to include and enterprise filed in my caculations but I am unsure as
to how to reference it. I am currently pulling values with the following code.

===================================================
For Each Asgn In T.Assignments
Set xlRow = xlRow.Offset(0, 0)
Set xlCol = xlRow.Offset(0, Columns)
'xlCol = Asgn.ResourceName
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 = T.Predecessors
Set xlCol = xlCol.Offset(0, 1)
xlCol = Asgn.Start
Set xlCol = xlCol.Offset(0, 1)
xlCol = Asgn.Finish
Set xlCol = xlCol.Offset(0, 1)
xlCol = Asgn.BaselineFinish
Set xlCol = xlCol.Offset(0, 1)
xlCol = T.Deadline
Set xlCol = xlCol.Offset(0, 1)
xlCol = Asgn.FinishVariance
Set xlCol = xlCol.Offset(0, 1)
xlCol = T.PercentComplete
Set xlCol = xlCol.Offset(0, 1)
xlCol = T.ID
Next Asgn
 
R

Rod Gill

How about:

activeproject.Tasks(1).Assignments(1).EnterpriseNumber1 or using your code:

Asgn.EnterpriseNumber1

--
For VBA posts, please use the public.project.developer group.
For any version of Project use public.project
For any version of Project Server use public. project.server

Rod Gill
Project MVP
For Microsoft Project companion projects, best practices and Project VBA
development services
visit www.project-systems.co.nz/
Email rodg AT project-systems DOT co DOT nz
 

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