Assignment object (Project)

Represents an assignment for a task or resource. The Assignment object is a member of an Assignments or an OverAllocatedAssignments collection.

Example

Using the Assignment Object

Use Assignments (index), where index is the assignment index number, to return a single Assignment object. The following example displays the name of the first resource assigned to the specified task.

MsgBox ActiveProject.Tasks(1).Assignments(1).ResourceName

Using the Assignments Collection

Use the Assignments property to return an Assignments collection. The following example displays all the resources assigned to the specified task.

Dim A As Assignment 
 
For Each A In ActiveProject.Tasks(1).Assignments 
 MsgBox A.ResourceName 
Next A

Use the Add method to add an Assignment object to the Assignments collection. The following example adds a resource identified by the number 212 as a new assignment for the specified task.

ActiveProject.Tasks(1).Assignments.Add ResourceID:=212

Methods

Name
AppendNotes
Delete
EnterpriseTeamMember
Replan
TimeScaleData

Properties

Name
ActualCost
ActualFinish
ActualOvertimeCost
ActualOvertimeWork
ActualStart
ActualWork
ACWP
Application
Baseline10BudgetCost
Baseline10BudgetWork
Baseline10Cost
Baseline10Finish
Baseline10Start
Baseline10Work
Baseline1BudgetCost
Baseline1BudgetWork
Baseline1Cost
Baseline1Finish
Baseline1Start
Baseline1Work
Baseline2BudgetCost
Baseline2BudgetWork
Baseline2Cost
Baseline2Finish
Baseline2Start
Baseline2Work
Baseline3BudgetCost
Baseline3BudgetWork
Baseline3Cost
Baseline3Finish
Baseline3Start
Baseline3Work
Baseline4BudgetCost
Baseline4BudgetWork
Baseline4Cost
Baseline4Finish
Baseline4Start
Baseline4Work
Baseline5BudgetCost
Baseline5BudgetWork
Baseline5Cost
Baseline5Finish
Baseline5Start
Baseline5Work
Baseline6BudgetCost
Baseline6BudgetWork
Baseline6Cost
Baseline6Finish
Baseline6Start
Baseline6Work
Baseline7BudgetCost
Baseline7BudgetWork
Baseline7Cost
Baseline7Finish
Baseline7Start
Baseline7Work
Baseline8BudgetCost
Baseline8BudgetWork
Baseline8Cost
Baseline8Finish
Baseline8Start
Baseline8Work
Baseline9BudgetCost
Baseline9BudgetWork
Baseline9Cost
Baseline9Finish
Baseline9Start
Baseline9Work
BaselineBudgetCost
BaselineBudgetWork
BaselineCost
BaselineFinish
BaselineStart
BaselineWork
BCWP
BCWS
BookingType
BudgetCost
BudgetWork
Confirmed
Cost
Cost1
Cost10
Cost2
Cost3
Cost4
Cost5
Cost6
Cost7
Cost8
Cost9
CostRateTable
CostVariance
Created
CV
Date1
Date10
Date2
Date3
Date4
Date5
Date6
Date7
Date8
Date9
Delay
Duration1
Duration10
Duration2
Duration3
Duration4
Duration5
Duration6
Duration7
Duration8
Duration9
Finish
Finish1
Finish10
Finish2
Finish3
Finish4
Finish5
Finish6
Finish7
Finish8
Finish9
FinishVariance
FixedMaterialAssignment
Flag1
Flag10
Flag11
Flag12
Flag13
Flag14
Flag15
Flag16
Flag17
Flag18
Flag19
Flag2
Flag20
Flag3
Flag4
Flag5
Flag6
Flag7
Flag8
Flag9
Guid
Hyperlink
HyperlinkAddress
HyperlinkHREF
HyperlinkScreenTip
HyperlinkSubAddress
Index
LevelingDelay
LinkedFields
Notes
Number1
Number10
Number11
Number12
Number13
Number14
Number15
Number16
Number17
Number18
Number19
Number2
Number20
Number3
Number4
Number5
Number6
Number7
Number8
Number9
Overallocated
OvertimeCost
OvertimeWork
Owner
Parent
Peak
PercentWorkComplete
Project
RegularWork
RemainingCost
RemainingOvertimeCost
RemainingOvertimeWork
RemainingWork
Resource
ResourceGuid
ResourceID
ResourceName
ResourceRequestType
ResourceType
ResourceUniqueID
ResponsePending
Start
Start1
Start10
Start2
Start3
Start4
Start5
Start6
Start7
Start8
Start9
StartVariance
Summary
SV
Task
TaskGuid
TaskID
TaskName
TaskOutlineNumber
TaskSummaryName
TaskUniqueID
TeamStatusPending
Text1
Text10
Text11
Text12
Text13
Text14
Text15
Text16
Text17
Text18
Text19
Text2
Text20
Text21
Text22
Text23
Text24
Text25
Text26
Text27
Text28
Text29
Text3
Text30
Text4
Text5
Text6
Text7
Text8
Text9
UniqueID
Units
UpdateNeeded
VAC
WBS
Work
WorkContour
WorkVariance
Compliant

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.