Application.EditTPStyle method (Project)

Edits the box and border colors of different types of tasks in the Team Planner view.

Syntax

expression. EditTPStyle( _Style_, _FillColor_, _BorderColor_ )

expression An expression that returns an Application object.

Parameters

Name Required/Optional Data type Description
Style Required PjTeamPlannerStyle Can be one of the PjTeamPlannerStyle constants, which specify whether the task type is auto scheduled, manually scheduled, actual work, an external task, or a late task.
FillColor Optional Variant Fill color of the specified task type. Can be a hexadecimal RGB value, where red is the last byte.
BorderColor Optional Variant Border color of the specified task type. Can be a hexadecimal RGB value, where red is the last byte.

Return value

Boolean

Remarks

To see the available style colors in the Team Planner view, or to manually format the view, in the Team Planner Tools section of the ribbon, choose the Format tab.

Example

In the following example, the first call to EditTPStyle sets late tasks to medium-dark red with a black border. The second call sets manually scheduled tasks to light red with a gray border.

Sub ChangeTeamPlannerStyles() 
    EditTPStyle Style:=pjTPLateTask, fillColor:=&H4444FF, bordercolor:=&H0 
    EditTPStyle Style:=pjTPManualTask, fillColor:=&H8888FF, bordercolor:=&H888888 
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.