ProjectBeforeTaskDelete2 Event

Occurs before a task is deleted. Uses the EventInfo object parameter.

Syntax

Private Sub object**_ProjectBeforeTaskDelete2(ByVal** tsk As MSProject.Task, 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.

tsk     The task that is being deleted.

Info     EventInfo.Cancel is False when the event occurs. If the event procedure sets this argument to True, the task is not deleted when the procedure is finished.

Remarks

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

The ProjectBeforeTaskDelete2 event does not occur when changes have been made using a custom form.

Applies to | Application Object

See Also | ProjectBeforeAssignmentDelete Event | ProjectBeforeResourceDelete Event | ProjectBeforeTaskChange Event | ProjectBeforeTaskDelete2 Event | ProjectBeforeTaskNew Event