Application.DurationValue method (Project)
Returns the number of minutes in a duration.
expression A variable that represents an Application object.
|Duration||Required||String||The duration to be expressed in minutes.|
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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.