Application.DetailStylesAdd Method

Project Developer Reference

Adds another timescale data field to a usage view.

Syntax

expression.DetailStylesAdd(Item, Position)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
Item Optional Long The timescale data field to add. The default value is pjWork.If the active view is the Resource Usage view, can be one of the PjTimescaledData constants.
Position Optional Integer The position to add the field, relative to other fields. If Position is n + 2 or greater, where n is the number of fields displayed, the field is added at n + 1. The default value is n + 1.

Return Value
Boolean

Example
The following example makes overallocations stand out from other information in a usage view.

Visual Basic for Applications
  Sub HighlightOverallocations()
<strong class="bterm">DetailStylesAdd</strong> pjOverallocation
DetailStylesFormat Item:=pjOverallocation, Font:="Arial", Size:=12, _
    Bold:=True, Color:=pjRed, CellColor:=pjBlack, Pattern:=pjSolidFill

End Sub

See Also