ProjectBeforeTaskDelete Event

Occurs before a task is deleted.

Syntax

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

tsk     The task that is being deleted.

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

Remarks

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

The ProjectBeforeTaskDelete event doesn't 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