ProjectBeforeTaskNew Event
Occurs before one or more tasks are created.
Syntax
Private Sub object**_ProjectBeforeTaskNew(ByVal** pj As MSProject.Project, Cancel As Boolean)
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 a task or tasks are being created.
Cancel False when the event occurs. If the event procedure sets this argument to True, the new task or tasks are not created.
Remarks
Project events do not occur when the project is embedded in another document or application.
The ProjectBeforeTaskNew event doesn't occur when data is merged or appended into a project, 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 | ProjectBeforeAssignmentNew Event | ProjectBeforeResourceNew Event | ProjectBeforeTaskChange Event | ProjectBeforeTaskDelete Event | ProjectBeforeTaskNew2 Event