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
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.