Skip to content

Latest commit

 

History

History
87 lines (39 loc) · 1.64 KB

Project.weekdays.md

File metadata and controls

87 lines (39 loc) · 1.64 KB
title ms.service ms.assetid ms.date ms.localizationpriority
WeekDays object (Project)
project-server
757437a0-e2ff-0027-f044-87d1cb357f62
06/08/2017
medium

WeekDays object (Project)

Contains a collection of Weekday objects.

Example

Using the Weekday Object

Use Weekdays (Index ), whereIndex 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 is to use the predefined constant for Friday instead of the nonintuitive number 6. Thus, the first line of the preceding example would be as follows:

With ActiveProject.Calendar.WeekDays(pjFriday)

Using the Weekdays Collection

Use the Weekdays property to return a Weekdays collection.

ActiveProject.Calendar.WeekDays

Properties

Name
Application
Count
Item
Parent

See also

Project Object Model

[!includeSupport and feedback]