Application.ProjectBeforeResourceChange2 Event

Project Developer Reference

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

Syntax

expression.ProjectBeforeResourceChange2(res, Field, NewVal, Info)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
res Required Resource The resource whose field is being changed.
Field Required Long The field being changed. If more than one field is changed by the user, the event is fired for each field changed. Can be one of the following PjField constants:
pjResourceAccrueAtpjResourceEnterpriseUniqueID
pjResourceActualCostpjResourceFinish
pjResourceActualOvertimeCostpjResourceFinish1-10
pjResourceActualOvertimeWorkpjResourceFlag1-20
pjResourceActualOvertimeWorkProtectedpjResourceGroup
pjResourceActualWorkpjResourceGroupBySummary
pjResourceActualWorkProtectedpjResourceHyperlink
pjResourceACWPpjResourceHyperlinkAddress
pjResourceAssignmentDelaypjResourceHyperlinkHref
pjResourceAssignmentUnitspjResourceHyperlinkScreenTip
pjResourceAvailableFrompjResourceHyperlinkSubAddress
pjResourceAvailableTopjResourceID
pjResourceBaseCalendarpjResourceIndex
pjResourceBaseline1-10CostpjResourceIndicators
pjResourceBaseline1-10FinishpjResourceInitials
pjResourceBaseline1-10StartpjResourceIsAssignment
pjResourceBaseline1-10WorkpjResourceLevelingDelay
pjResourceBaselineCostpjResourceLinkedFields
pjResourceBaselineFinishpjResourceMaterialLabel
pjResourceBaselineStartpjResourceMaxUnits
pjResourceBaselineWorkpjResourceName
pjResourceBCWPpjResourceNotes
pjResourceBCWSpjResourceNumber1-20
pjResourceBookingTypepjResourceObjects
pjResourceCanLevelpjResourceOutlineCode1-10
pjResourceCodepjResourceOverallocated
pjResourceConfirmedpjResourceOvertimeCost
pjResourceCostpjResourceOvertimeRate
pjResourceCost1-10pjResourceOvertimeWork
pjResourceCostPerUsepjResourcePeakUnits
pjResourceCostRateTablepjResourcePercentWorkComplete
pjResourceCostVariancepjResourcePhonetics
pjResourceCreatedpjResourceProject
pjResourceCVpjResourceRegularWork
pjResourceDate1-10pjResourceRemainingCost
pjResourceDemandedRequestedpjResourceRemainingOvertimeCost
pjResourceDuration1-10pjResourceRemainingOvertimeWork
pjResourceEMailAddresspjResourceRemainingWork
pjResourceEnterprisepjResourceResponsePending
pjResourceEnterpriseBaseCalendarpjResourceSheetNotes
pjResourceEnterpriseCheckedOutBypjResourceStandardRate
pjResourceEnterpriseCost1-10pjResourceStart
pjResourceEnterpriseDate1-30pjResourceStart1-10
pjResourceEnterpriseDuration1-10pjResourceSV
pjResourceEnterpriseFlag1-20pjResourceTaskSummaryName
pjResourceEnterpriseGenericpjResourceTeamStatusPending
pjResourceEnterpriseInactivepjResourceText1-30
pjResourceEnterpriseIsCheckedOutpjResourceType
pjResourceEnterpriseLastModifiedDatepjResourceUniqueID
pjResourceEnterpriseMultiValue20-29pjResourceUpdateNeeded
pjResourceEnterpriseNameUsedpjResourceVAC
pjResourceEnterpriseNumber1-40pjResourceWindowsUserAccount
pjResourceEnterpriseOutlineCode1-29pjResourceWork
pjResourceEnterpriseRBSpjResourceWorkContour
pjResourceEnterpriseRequiredValuespjResourceWorkgroup
pjResourceEnterpriseTeamMemberpjResourceWorkVariance
pjResourceEnterpriseText1-40
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 Required Variant The new value for the field specified with Field.
Info Required EventInfo 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.

Return Value
nothing

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.

See Also