Share via


WeekDay.Working Property

Project Developer Reference

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

Syntax

expression.Working

expression   A variable that represents a WeekDay object.

Return Value
Boolean

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

Visual Basic for Applications
  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").<strong class="bterm">Working</strong> = False
            Y.Months("July").<strong class="bterm">Working</strong> = False
            Y.Months("August").<strong class="bterm">Working</strong> = False
        Next Y
    End If
    
Next R

End Sub

See Also