Share via


EventInfo Object

Application
EventInfo

Represents cancel information of the event object.

Using the EventInfo Object

The EventInfo object has one Boolean property, Cancel. The EventInfo object is used instead of the Cancel parameter that is used in events in previous versions of Project. The following example examines any 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

Properties | Cancel Property

Parent Objects | Application Object

Child Objects