Share via


Year.Months Property

Project Developer Reference

Returns a Months collection representing the months in a year. Read-only Object.

Syntax

expression.Months

expression   A variable that represents a Year object.

Example
The following example makes January 1 of every year a nonworking day.

Visual Basic for Applications
  Sub NewYearsDayOff()
Dim Y As Year

For Each Y In ActiveProject.Calendar.Years
    Y.<strong class="bterm">Months</strong>(pjJanuary).Days(1).Working = False
Next Y

End Sub

See Also