Returns or sets the actual finish date of an assignment or task. Read-only for summary tasks. Read/write Variant.
Syntax
expression.ActualFinish
expression A variable that represents a Task object.
Return Value
Variant
Example
The following example prompts the user to set the actual finish dates of tasks in the active project.
Visual Basic for Applications
Sub SetActualFinishForTasks()
Dim T As Task ' Task object used in For Each loop
Dim Entry As String ' User's entry
For Each T In ActiveProject.Tasks
' Loop until user enters a date or clicks Cancel.
Do While 1
Entry = InputBox$("Enter the actual finish date for " & _
T.Name & ":")
If IsDate(Entry) Or Entry = Empty Then
Exit Do
Else
MsgBox ("You didn't enter a date; try again.")
End If
Loop
'If user didn't click Cancel, set the task's actual finish date.
If Entry <> Empty Then
T.<strong class="bterm">ActualFinish</strong> = Entry
End If
Next T