DurationValue Method

Returns the number of minutes in a duration.

Syntax

expression**.DurationValue(Duration)**

*expression   *     Optional. An expression that returns an Application object.

Duration Required String. The duration to be expressed in minutes.

Example

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

Sub DurationAdder()

    Dim Temp As String

    Temp = InputBox$("Enter amount by which to increase the duration:")
    ActiveCell.Task.Duration = ActiveCell.Task.Duration + DurationValue(Temp)
    
End Sub

Applies to | Application Object

See Also | DurationFormat Method