Share via


Working Property

True if any day in a calendar period is a working day. Read/write Boolean.

Example

The following example makes June, July, and August nonworking months for resources in the "Student" group of the active project.

Sub GiveStudentsSummerOff()

    Dim R As Resource   ' Resource object used in For Each loop
    Dim Y As Year       ' Year object used in For Each loop

    ' Look for resources in the "Student" group of the active project.
    For Each R In ActiveProject.Resources
        
        ' Give the summer off to resources in the "Student" group.
        If R.Group = "Student" Then
            For Each Y In R.Calendar.Years
                Y.Months("June").Working = False
                Y.Months("July").Working = False
                Y.Months("August").Working = False
            Next Y
        End If
        
    Next R
    
End Sub

Applies to | Day Object, Days Collection Object | Month Object, Months Collection Object | Period Object | WeekDay Object, WeekDays Collection Object | Year Object, Years Collection Object

See Also | Default Method | Reset Method