TimeScaleValue Object, TimeScaleValues Collection Object

Multiple objects
TimeScaleValues
TimeScaleValue

Represents a timescaled data item. The TimeScaleValue object is a member of the TimeScaleValues collection.

Using the TimeScaleValue Object

Use TimeScaleValues(Index), where Index is the timescaled data index number, to return a single TimeScaleValue object. The following example displays the number of hours of work per day for a resource during the first full week in October.

Dim TSV As TimeScaleValues, HowMany As Long
Dim HoursPerDay As String

Set TSV = ActiveCell.Resource.TimeScaleData("10/7/02", "10/11/02", TimescaleUnit:=pjTimescaleDays)

For HowMany = 1 To TSV.Count
    HoursPerDay = HoursPerDay & TSV(HowMany).StartDate & " - " & _
        TSV(HowMany).EndDate & ", " & TSV(HowMany) / 60 & vbCrLf
Next HowMany

MsgBox HoursPerDay

Using the TimeScaleValues Collection

Use the TimeScaleData method to return a TimeScaleValues collection. The following example returns a TimeScaleValues collection for the amount of work done by the resource in the active cell between the specified dates, split into week-long portions.

ActiveCell.Resource.TimeScaleData("10/1/02", "10/31/02")

Use the Add method to add a TimeScaleValue object to the TimeScaleValues collection. The following example adds 8 hours of work to Tuesday of that week.

Dim TSV As TimeScaleValues

Set TSV = ActiveCell.Resource.TimeScaleData("10/7/02", "10/11/02", TimescaleUnit:=pjTimescaleDays)
TSV.Add 480, 2

Properties | Application Property | Count Property | EndDate Property | Index Property | Item Property | Parent Property | StartDate Property | Value Property

Methods | Add Method | Clear Method | Delete Method

Parent Objects | Assignment Object, Assignments Collection Object | Resource Object, Resources Collection Object | Task Object, Tasks Collection Object

Child Objects

See Also | TimeScaleData Method