Share via


ProjectBeforeResourceChange2 Event

Occurs before the user changes the value of a resource field. Uses the EventInfo object parameter.

Syntax

Private Sub object**_ProjectBeforeResourceChange2(ByVal** res As MSProject.Resource, ByVal Field As PjField, 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.

res     The resource whose field is being changed.

PjField

pjResourceAccrueAt pjResourceEnterpriseUniqueID
pjResourceActualCost pjResourceFinish
pjResourceActualOvertimeCost pjResourceFinish1-10
pjResourceActualOvertimeWork pjResourceFlag1-20
pjResourceActualOvertimeWorkProtected pjResourceGroup
pjResourceActualWork pjResourceGroupBySummary
pjResourceActualWorkProtected pjResourceHyperlink
pjResourceACWP pjResourceHyperlinkAddress
pjResourceAssignmentDelay pjResourceHyperlinkHref
pjResourceAssignmentUnits pjResourceHyperlinkScreenTip
pjResourceAvailableFrom pjResourceHyperlinkSubAddress
pjResourceAvailableTo pjResourceID
pjResourceBaseCalendar pjResourceIndex
pjResourceBaseline1-10Cost pjResourceIndicators
pjResourceBaseline1-10Finish pjResourceInitials
pjResourceBaseline1-10Start pjResourceIsAssignment
pjResourceBaseline1-10Work pjResourceLevelingDelay
pjResourceBaselineCost pjResourceLinkedFields
pjResourceBaselineFinish pjResourceMaterialLabel
pjResourceBaselineStart pjResourceMaxUnits
pjResourceBaselineWork pjResourceName
pjResourceBCWP pjResourceNotes
pjResourceBCWS pjResourceNumber1-20
pjResourceBookingType pjResourceObjects
pjResourceCanLevel pjResourceOutlineCode1-10
pjResourceCode pjResourceOverallocated
pjResourceConfirmed pjResourceOvertimeCost
pjResourceCost pjResourceOvertimeRate
pjResourceCost1-10 pjResourceOvertimeWork
pjResourceCostPerUse pjResourcePeakUnits
pjResourceCostRateTable pjResourcePercentWorkComplete
pjResourceCostVariance pjResourcePhonetics
pjResourceCreated pjResourceProject
pjResourceCV pjResourceRegularWork
pjResourceDate1-10 pjResourceRemainingCost
pjResourceDemandedRequested pjResourceRemainingOvertimeCost
pjResourceDuration1-10 pjResourceRemainingOvertimeWork
pjResourceEMailAddress pjResourceRemainingWork
pjResourceEnterprise pjResourceResponsePending
pjResourceEnterpriseBaseCalendar pjResourceSheetNotes
pjResourceEnterpriseCheckedOutBy pjResourceStandardRate
pjResourceEnterpriseCost1-10 pjResourceStart
pjResourceEnterpriseDate1-30 pjResourceStart1-10
pjResourceEnterpriseDuration1-10 pjResourceSV
pjResourceEnterpriseFlag1-20 pjResourceTaskSummaryName
pjResourceEnterpriseGeneric pjResourceTeamStatusPending
pjResourceEnterpriseInactive pjResourceText1-30
pjResourceEnterpriseIsCheckedOut pjResourceType
pjResourceEnterpriseLastModifiedDate pjResourceUniqueID
pjResourceEnterpriseMultiValue20-29 pjResourceUpdateNeeded
pjResourceEnterpriseNameUsed pjResourceVAC
pjResourceEnterpriseNumber1-40 pjResourceWindowsUserAccount
pjResourceEnterpriseOutlineCode1-29 pjResourceWork
pjResourceEnterpriseRBS pjResourceWorkContour
pjResourceEnterpriseRequiredValues pjResourceWorkgroup
pjResourceEnterpriseTeamMember pjResourceWorkVariance
pjResourceEnterpriseText1-40  

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 ProjectBeforeResourceChange2 event doesn't occur when timescaled data changes, when a baseline is cleared, when an entire resource row is pasted, 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 | ProjectBeforeResourceChange Event | ProjectBeforeResourceDelete Event | ProjectBeforeResourceNew Event | ProjectBeforeTaskChange Event