Share via


Application.UpdateTasks Method

Project Developer Reference

Updates the active tasks.

Syntax

expression.UpdateTasks(PercentComplete, ActualDuration, RemainingDuration, ActualStart, ActualFinish, Notes)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
PercentComplete Optional Variant The percent complete of the active tasks.
ActualDuration Optional Variant . The actual duration of the active tasks.
RemainingDuration Optional Variant The remaining duration of the active tasks.
ActualStart Optional Variant The actual start date of the active tasks.
ActualFinish Optional Variant The actual finish date of the active tasks.
Notes Optional String Any comments for the active tasks.

Return Value
Boolean

Remarks

Using the UpdateTasks method without specifying any arguments displays the Update Tasks dialog box.

Example
The following example first creates a new task called "TestTask-1" and updates the task to 50% complete. Then it deletes the task.

Visual Basic for Applications
  Sub Update_Tasks()
'Activate Gantt Chart
 ViewApply Name:="Gantt Chart"

'Create a new task
RowInsert
SetTaskField Field:="Name", Value:="TestTask-1"
SetTaskField Field:="Duration", Value:="2"

'Update the percent complete of the new task.
UpdateTasks PercentComplete:="50"

'Delete the new task
ActiveProject.Tasks("TestTask-1").Delete

End Sub

See Also