Application.ProjectBeforeAssignmentDelete event (Project)

Occurs before an assignment is removed or replaced.

Syntax

expression. ProjectBeforeAssignmentDelete( _asg_, _Cancel_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
asg Required Assignment The assignment that is being removed.
Cancel Required Boolean False when the event occurs. If the event procedure sets this argument to True, the assignment is not removed. If the assignment is being removed because the associated resource has been deleted, Cancel is ignored.

Return value

Nothing

Remarks

The ProjectBeforeAssignmentDelete event also fires when assigning a resource to a task with no resource assignments, because an "Unassigned Resource" assignment is removed before the new assignment is created.

Project events don't occur when the project is embedded in another document or application.

The ProjectBeforeAssignmentDelete event doesn't occur when an assignment is deleted as the result of a drag-and-drop operation in the Resource Usage view, or when changes have been made using a custom form.

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.