Объект назначений (Project)Assignment object (Project)

Представляет назначение для задачи или ресурса.Represents an assignment for a task or resource. Объект присваивания является членом назначений или коллекции OverAllocatedAssignments .The Assignment object is a member of an Assignments or an OverAllocatedAssignments collection.

ПримерExample

Использование объекта "назначение"Using the Assignment Object

Используйте назначения (index), где index — это номер индекса назначения, чтобы вернуть один объект назначения .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

Используйте метод Add , чтобы добавить объект назначения в коллекцию назначений .Use the Add method to add an Assignment object to the Assignments collection. В следующем примере показано, как добавить ресурс, определенный с помощью номера 212, в качестве нового назначения для указанной задачи.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
AppendNotesAppendNotes
DeleteDelete
EnterpriseTeamMemberEnterpriseTeamMember
ReplanReplan
TimeScaleDataTimeScaleData

СвойстваProperties

ИмяName
ActualCostActualCost
ActualFinishActualFinish
ActualOvertimeCostActualOvertimeCost
ActualOvertimeWorkActualOvertimeWork
ActualStartActualStart
ActualWorkActualWork
ACWPACWP
ApplicationApplication
Baseline10BudgetCostBaseline10BudgetCost
Baseline10BudgetWorkBaseline10BudgetWork
Baseline10CostBaseline10Cost
Baseline10FinishBaseline10Finish
Baseline10StartBaseline10Start
Baseline10WorkBaseline10Work
Baseline1BudgetCostBaseline1BudgetCost
Baseline1BudgetWorkBaseline1BudgetWork
Baseline1CostBaseline1Cost
Baseline1FinishBaseline1Finish
Baseline1StartBaseline1Start
Baseline1WorkBaseline1Work
Baseline2BudgetCostBaseline2BudgetCost
Baseline2BudgetWorkBaseline2BudgetWork
Baseline2CostBaseline2Cost
Baseline2FinishBaseline2Finish
Baseline2StartBaseline2Start
Baseline2WorkBaseline2Work
Baseline3BudgetCostBaseline3BudgetCost
Baseline3BudgetWorkBaseline3BudgetWork
Baseline3CostBaseline3Cost
Baseline3FinishBaseline3Finish
Baseline3StartBaseline3Start
Baseline3WorkBaseline3Work
Baseline4BudgetCostBaseline4BudgetCost
Baseline4BudgetWorkBaseline4BudgetWork
Baseline4CostBaseline4Cost
Baseline4FinishBaseline4Finish
Baseline4StartBaseline4Start
Baseline4WorkBaseline4Work
Baseline5BudgetCostBaseline5BudgetCost
Baseline5BudgetWorkBaseline5BudgetWork
Baseline5CostBaseline5Cost
Baseline5FinishBaseline5Finish
Baseline5StartBaseline5Start
Baseline5WorkBaseline5Work
Baseline6BudgetCostBaseline6BudgetCost
Baseline6BudgetWorkBaseline6BudgetWork
Baseline6CostBaseline6Cost
Baseline6FinishBaseline6Finish
Baseline6StartBaseline6Start
Baseline6WorkBaseline6Work
Baseline7BudgetCostBaseline7BudgetCost
Baseline7BudgetWorkBaseline7BudgetWork
Baseline7CostBaseline7Cost
Baseline7FinishBaseline7Finish
Baseline7StartBaseline7Start
Baseline7WorkBaseline7Work
Baseline8BudgetCostBaseline8BudgetCost
Baseline8BudgetWorkBaseline8BudgetWork
Baseline8CostBaseline8Cost
Baseline8FinishBaseline8Finish
Baseline8StartBaseline8Start
Baseline8WorkBaseline8Work
Baseline9BudgetCostBaseline9BudgetCost
Baseline9BudgetWorkBaseline9BudgetWork
Baseline9CostBaseline9Cost
Baseline9FinishBaseline9Finish
Baseline9StartBaseline9Start
Baseline9WorkBaseline9Work
BaselineBudgetCostBaselineBudgetCost
BaselineBudgetWorkBaselineBudgetWork
BaselineCostBaselineCost
BaselineFinishBaselineFinish
BaselineStartBaselineStart
BaselineWorkBaselineWork
BCWPBCWP
BCWSBCWS
BookingTypeBookingType
BudgetCostBudgetCost
BudgetWorkBudgetWork
ConfirmedConfirmed
CostCost
Cost1Cost1
Cost10Cost10
Cost2Cost2
Cost3Cost3
Cost4Cost4
Cost5Cost5
Cost6Cost6
Cost7Cost7
Cost8Cost8
Cost9Cost9
CostRateTableCostRateTable
CostVarianceCostVariance
CreatedCreated
CVCV
Date1Date1
Date10Date10
Date2Date2
Date3Date3
Date4Date4
Date5Date5
Date6Date6
Date7Date7
Date8Date8
Date9Date9
DelayDelay
Duration1Duration1
Duration10Duration10
Duration2Duration2
Duration3Duration3
Duration4Duration4
Duration5Duration5
Duration6Duration6
Duration7Duration7
Duration8Duration8
Duration9Duration9
FinishFinish
Finish1Finish1
Finish10Finish10
Finish2Finish2
Finish3Finish3
Finish4Finish4
Finish5Finish5
Finish6Finish6
Finish7Finish7
Finish8Finish8
Finish9Finish9
FinishVarianceFinishVariance
FixedMaterialAssignmentFixedMaterialAssignment
Flag1Flag1
Flag10Flag10
Flag11Flag11
Flag12Flag12
Flag13Flag13
Flag14Flag14
Flag15Flag15
Flag16Flag16
Flag17Flag17
Flag18Flag18
Flag19Flag19
Flag2Flag2
Flag20Flag20
Flag3Flag3
Flag4Flag4
Flag5Flag5
Flag6Flag6
Flag7Flag7
Flag8Flag8
Flag9Flag9
GuidGuid
HyperlinkHyperlink
HyperlinkAddressHyperlinkAddress
HyperlinkHREFHyperlinkHREF
HyperlinkScreenTipHyperlinkScreenTip
HyperlinkSubAddressHyperlinkSubAddress
IndexIndex
LevelingDelayLevelingDelay
LinkedFieldsLinkedFields
NotesNotes
Number1Number1
Number10Number10
Number11Number11
Number12Number12
Number13Number13
Number14Number14
Number15Number15
Number16Number16
Number17Number17
Number18Number18
Number19Number19
Number2Number2
Number20Number20
Number3Number3
Number4Number4
Number5Number5
Number6Number6
Number7Number7
Number8Number8
Number9Number9
OverallocatedOverallocated
OvertimeCostOvertimeCost
OvertimeWorkOvertimeWork
OwnerOwner
ParentParent
PeakPeak
PercentWorkCompletePercentWorkComplete
ProjectProject
RegularWorkRegularWork
RemainingCostRemainingCost
RemainingOvertimeCostRemainingOvertimeCost
RemainingOvertimeWorkRemainingOvertimeWork
RemainingWorkRemainingWork
ResourceResource
ResourceGuidResourceGuid
ResourceIDResourceID
ResourceNameResourceName
ResourceRequestTypeResourceRequestType
ResourceTypeResourceType
ResourceUniqueIDResourceUniqueID
ResponsePendingResponsePending
StartStart
Start1Start1
Start10Start10
Start2Start2
Start3Start3
Start4Start4
Start5Start5
Start6Start6
Start7Start7
Start8Start8
Start9Start9
StartVarianceStartVariance
SummarySummary
SVSV
TaskTask
TaskGuidTaskGuid
TaskIDTaskID
TaskNameTaskName
TaskOutlineNumberTaskOutlineNumber
TaskSummaryNameTaskSummaryName
TaskUniqueIDTaskUniqueID
TeamStatusPendingTeamStatusPending
Text1Text1
Text10Text10
Text11Text11
Text12Text12
Text13Text13
Text14Text14
Text15Text15
Text16Text16
Text17Text17
Text18Text18
Text19Text19
Text2Text2
Text20Text20
Text21Text21
Text22Text22
Text23Text23
Text24Text24
Text25Text25
Text26Text26
Text27Text27
Text28Text28
Text29Text29
Text3Text3
Text30Text30
Text4Text4
Text5Text5
Text6Text6
Text7Text7
Text8Text8
Text9Text9
UniqueIDUniqueID
UnitsUnits
UpdateNeededUpdateNeeded
VACVAC
WBSWBS
WorkWork
WorkContourWorkContour
WorkVarianceWorkVariance
CompliantCompliant

Поддержка и обратная связьSupport and feedback

Есть вопросы или отзывы, касающиеся Office VBA или этой статьи?Have questions or feedback about Office VBA or this documentation? Руководство по другим способам получения поддержки и отправки отзывов см. в статье Поддержка Office VBA и обратная связь.Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.