title | ms.service | ms.assetid | ms.date | ms.localizationpriority |
---|---|---|---|---|
Days object (Project) |
project-server |
ac9cc007-a318-c9a8-2e6c-c4834a52d5c2 |
06/08/2017 |
medium |
Contains a collection of Day objects.
Using the Days Collection Object
Use **Days(Index ), whereIndex is the day index number or PjWeekday constant, to return a single Day object. The following example counts the number of working days in the month of September 2002 for each selected resource.
Dim R As Resource, D As Integer, WorkingDays As Integer
For Each R In ActiveSelection.Resources()
WorkingDays = 0
With R.Calendar.Years(2002).Months(pjSeptember)
For D = 1 To .Days.Count
If .Days(D).Working = True Then
WorkingDays = WorkingDays + 1
End If
Next D
End With
MsgBox "There are " & WorkingDays & " working days in " _
& R.Name & "'s calendar."
Next R
Getting the Days Collection Object.
Use the Days property to return a Days collection. The following example counts the number of days in the month of September 2002.
MsgBox ActiveProject.Calendar.Years(2006).Months(pjNovember).Days.Count
Name |
---|
Application |
Count |
Item |
Parent |
[!includeSupport and feedback]