Share via


Clear Method

Clears the start and finish times of a work shift, or the value of a timescaled data item.

Syntax

expression**.Clear**

*expression   *     Required. An expression that returns a Shift or TimeScaleValue object.

Example

The following example schedules a half-day of work on Fridays by creating an 8 A.M. to noon shift and removing the second and third shifts.

Sub HalfDayFridays()
    With ActiveProject.Calendar.Weekdays(pjFriday)
        .Shift1.Start = #8:00:00 AM#
        .Shift1.Finish = #12:00:00 PM#
        .Shift2.Clear
        .Shift3.Clear
    End With
End Sub

Applies to | Shift Object | TimeScaleValue Object, TimeScaleValues Collection Object

See Also | Default Method | Reset Method | Value Property | Working Property