Table of contents
Collapse the table of content
Expand the table of content

EventInfo Object (Project)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Represents cancellation information for an event.


The EventInfo object has one Boolean property, named Cancel. Project uses the EventInfo object instead of the Cancel parameter that is used for events in some previous versions of Project.


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


© 2018 Microsoft