Application.DurationValue Method

Project Developer Reference

Returns the number of minutes in a duration.

Syntax

expression.DurationValue(Duration)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
Duration Required String The duration to be expressed in minutes.

Return Value
Variant

Example
The following example adds the entered value to the duration of the selected task.

Visual Basic for Applications
  Sub DurationAdder()
Dim Temp As String

Temp = InputBox$("Enter amount by which to increase the duration:")
ActiveCell.Task.Duration = ActiveCell.Task.Duration + <strong class="bterm">DurationValue</strong>(Temp)

End Sub

See Also