ProjectBeforeAssignmentDelete2 Event
Occurs before an assignment is removed or replaced. Uses the EventInfo object parameter.
Syntax
Private Sub object**_ProjectBeforeAssignmentDelete2(ByVal** asg As MSProject.Assignment, 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 that is being removed.
Info EventInfo.Cancel is 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, Info is ignored.
Remarks
The ProjectBeforeAssignmentDelete2 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 do not occur when the project is embedded in another document or application.
The ProjectBeforeAssignmentDelete2 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.
Applies to | Application Object
See Also | ProjectBeforeAssignmentChange Event | ProjectBeforeAssignmentDelete Event | ProjectBeforeAssignmentNew Event | ProjectBeforeResourceDelete Event | ProjectBeforeTaskDelete Event