Share via


Application.UpdateProject Method

Project Developer Reference

Records progress on specified tasks.

Syntax

expression.UpdateProject(All, UpdateDate, Action)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
All Optional Boolean True if all tasks in the active project are updated. False if only the selected tasks are updated. The default value is True.
UpdateDate Optional Variant The date used to indicate progress.
Action Optional Long The action to take with the specified tasks. Can be one of the PjProjectUpdate constants.

Return Value
Boolean

Example
The following example first creates a new task, "TestTask-1"; sets the "% Complete" field to 50 percent; and then updates the project to schedule the rest of the work for the task to start on 9 / 19 / 2005. Then it deletes the task.

Visual Basic for Applications
  Sub Update_Project()
 ViewApply Name:="Gantt Chart"

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

'Schedules the remainder of the work to start on the update date.
UpdateProject All:=False, UpdateDate:="9 / 19 / 2005", Action:=pjReschedule

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

End Sub

See Also