Skip to content

Latest commit

 

History

History
92 lines (43 loc) · 2.12 KB

Project.availabilities.md

File metadata and controls

92 lines (43 loc) · 2.12 KB
title ms.service ms.assetid ms.date ms.localizationpriority
Availabilities object (Project)
project-server
51224d62-777b-1ae3-a646-ca977464d37d
06/08/2017
medium

Availabilities object (Project)

Contains a collection of Availability objects.

Example

Using the Availabilities Collection

Use Availabilities( Index ), where Index is the availability index number, to return a single Availability object. The following example returns the availability information from the first line of the Resource Availability grid for the specified resource.

MsgBox ActiveProject.Resources("Tom").Name & " is available from " & _  
    ActiveProject.Resources("Tom").Availabilities(1).AvailableFrom & " to " & _  
    ActiveProject.Resources("Tom").Availabilities(1).AvailableTo & "."  

Using the Availabilities Collection

Use the Availabilities property to return an Availabilities collection. The following example displays the range of dates during which the specified resource is available for work.

Dim Avail As Availability  

For Each Avail In ActiveProject.Resources("Tom").Availabilities  
    MsgBox "From " & Avail.AvailableFrom & " to " & Avail.AvailableTo  
Next Avail

Use the Add method to add an Availability object to the Availabilities collection. The following example adds a line to the Resource Availability grid showing that the specified resource is available only half-time during the month of April.

ActiveProject.Resources("Tom").Availabilities.Add "4/1/2012", "4/30/2012", 50

Methods

Name
Add

Properties

Name
Application
Count
Item
Parent

See also

Project Object Model

[!includeSupport and feedback]