Share via


ProjectBeforeResourceNew2 Event

Occurs before one or more resources are created. Uses the EventInfo object parameter.

Syntax

Private Sub object**_ProjectBeforeResourceNew2(ByVal** pj As MSProject.Project, 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.

pj     The project in which the resource or resources are being created.

Info     EventInfo.Cancel is False when the event occurs. If the event procedure sets this argument to True, the new resource or resources are not created.

Remarks

Project events do not occur when the project is embedded in another document or application.

The ProjectBeforeResourceNew2 event doesn't occur during resource pool operations, when inserting or removing a subproject, or when changes have been made using a custom form.

Applies to | Application Object

See Also | ProjectBeforeAssignmentNew2 Event | ProjectBeforeResourceChange2 Event | ProjectBeforeResourceDelete2 Event | ProjectBeforeResourceNew Event | ProjectBeforeTaskNew2 Event