EventInfo Object (Project)
Represents cancellation information for an event.
The following event handler examines new resource assignments and cancels them if they are for the specified resource.
Private Sub App_ProjectBeforeAssignmentChange2(ByVal asg As Assignment, ByVal Field As PjAssignmentField, _ ByVal NewVal As Variant, EventInfo As Object) If Field = pjAssignmentResourceName And NewVal = "Lisa Jones" Then MsgBox "Lisa is no longer available for assignment!" EventInfo.Cancel = True End If End Sub