Application.DetailStylesAdd method (Project)

Adds another timescale data field to a usage view.


expression. DetailStylesAdd( _Item_, _Position_ )

expression A variable that represents an Application object.


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



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

Sub HighlightOverallocations() 
 DetailStylesAdd pjOverallocation 
 DetailStylesFormat Item:=pjOverallocation, Font:="Arial", Size:=12, _ 
 Bold:=True, Color:=pjRed, CellColor:=pjBlack, Pattern:=pjSolidFill 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.