Share via


ProjectBeforeAssignmentChange2 Event

Occurs before the user changes the value of an assignment field. Uses the EventInfo object parameter.

Syntax

Private Sub object**_ProjectBeforeAssignmentChange2(ByVal** asg As MSProject.Assignment, ByVal Field As PjAssignmentField, ByVal NewVal As Variant, Info As MSProject.EventInfo)

object     An object of type Application declared with events in a class module. For more information, see Using events with the Application object.

asg     The assignment whose field is being changed.

PjAssignmentField

pjAssignmentActualCost pjAssignmentHyperlinkHREF
pjAssignmentActualFinish pjAssignmentHyperlinkScreenTip
pjAssignmentActualOvertimeCost pjAssignmentHyperlinkSubAddress
pjAssignmentActualOvertimeWork pjAssignmentIndex
pjAssignmentActualStart pjAssignmentLevelingDelay
pjAssignmentActualWork pjAssignmentLinkedFields
pjAssignmentACWP pjAssignmentNotes
pjAssignmentAssignmentUnits pjAssignmentNumber1-20
pjAssignmentBaseline1-10Cost pjAssignmentOverallocated
pjAssignmentBaseline1-10Finish pjAssignmentOvertimeCost
pjAssignmentBaseline1-10Start pjAssignmentOvertimeWork
pjAssignmentBaseline1-10Work pjAssignmentPeak
pjAssignmentBaselineCost pjAssignmentPercentWorkComplete
pjAssignmentBaselineFinish pjAssignmentProject
pjAssignmentBaselineStart pjAssignmentRegularWork
pjAssignmentBaselineWork pjAssignmentRemainingCost
pjAssignmentBCWP pjAssignmentRemainingOvertimeCost
pjAssignmentBCWS pjAssignmentRemainingOvertimeWork
pjAssignmentConfirmed pjAssignmentRemainingWork
pjAssignmentCost pjAssignmentResourceID
pjAssignmentCost1-10 pjAssignmentResourceName
pjAssignmentCostRateTable pjAssignmentResourceRequestType
pjAssignmentCostVariance pjAssignmentResourceType
pjAssignmentCV pjAssignmentResourceUniqueID
pjAssignmentDate1-10 pjAssignmentResponsePending
pjAssignmentDelay pjAssignmentStart
pjAssignmentDuration1-10 pjAssignmentStart1-10
pjAssignmentEnterpriseCost1-10 pjAssignmentStartVariance
pjAssignmentEnterpriseDate1-30 pjAssignmentSV
pjAssignmentEnterpriseDuration1-10 pjAssignmentTaskID
pjAssignmentEnterpriseFlag1-20 pjAssignmentTaskName
pjAssignmentEnterpriseNumber1-40 pjAssignmentTaskSummaryName
pjAssignmentEnterpriseResourceOutlineCode1-30 pjAssignmentTaskUniqueID
pjAssignmentEnterpriseText1-40 pjAssignmentTeamStatusPending
pjAssignmentFinish pjAssignmentText1-30
pjAssignmentFinish1-10 pjAssignmentUniqueID
pjAssignmentFinishVariance pjAssignmentUpdateNeeded
pjAssignmentFixedMaterialAssignment pjAssignmentVAC
pjAssignmentFlag1-20 pjAssignmentWork
pjAssignmentHyperlink pjAssignmentWorkContour
pjAssignmentHyperlinkAddress pjAssignmentWorkVariance

NewVal     The new value for the field specified with Field.

Info     EventInfo.Cancel is False when the event occurs. If the event procedure sets this argument to True, the value for the field specified with Field is not changed.

Remarks

Project events do not occur when the project is embedded in another document or application.

The ProjectBeforeAssignmentChange2 event doesn't occur when timescaled data changes, when an entire resource or task row is pasted, when an assignment is changed as the result of a drag-and-drop operation in the Resource Usage view, during resource pool operations, when inserting or removing a subproject, or when changes have been made using a custom form.

Applies to | Application Object

See Also | ProjectBeforeAssignmentChange Event | ProjectBeforeAssignmentDelete Event | ProjectBeforeAssignmentNew Event | ProjectBeforeResourceChange Event | ProjectBeforeTaskChange Event