WeekDay Object, WeekDays Collection Object

Calendar
WeekDays
WeekDay
Multiple objects

Represents a weekday or the weekdays in a calendar. The Weekday object is a member of the Weekdays collection.

Using the Weekday Object

Use Weekdays(Index), where Index is the weekday index number, three letter abbreviation of the day name, or PjWeekday constant, to return a single Weekday object. The following example sets Friday (the sixth day of a week starting on Sunday) as a half-day by setting the start and finish times for the first shift and clearing the values of the second and third shifts.

With ActiveProject.Calendar.WeekDays(6)
    .Shift1.Start = #8:00:00 AM#
    .Shift1.Finish = #12:00:00 PM#
    .Shift2.Clear
    .Shift3.Clear
End With

A much better way to return the same object would be to use the predefined constant for Friday instead of the nonintuitive number 6. Thus, the first line of the preceding example would be

With ActiveProject.Calendar.WeekDays(pjFriday)

Using the Weekdays Collection

Use the Weekdays property to return a Weekdays collection.

ActiveProject.Calendar.WeekDays

Properties | Application Property | Calendar Property | Count Property | Count Property | Index Property | Item Property | Name Property | Parent Property | Shiftn Property | Working Property

Methods | Default Method

Parent Objects | Calendar Object, Calendars Collection Object

Child Objects | Calendar Object, Calendars Collection Object | Shift Object

See Also | Weekdays Property