Application.CalendarBarStylesEdit Method

Project Developer Reference

Changes the style of a bar in the Calendar.

Syntax

expression.CalendarBarStylesEdit(Item, Bar, Pattern, Color, Align, Wrap, Shadow, Field1, Field2, Field3, Field4, Field5, SplitPattern)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
Item Required Long The calendar bar to edit. Can be one of the following PjBarItem constants: pjBarNonCritical, pjBarCritical, pjBarSummary, pjBarMilestone, pjBarMarked, pjBarHighlighted, pjBarProjectSummary, or pjBarExternalTask.
Bar Optional Long The bar type. Can be one of the following PjCalendarBarType constants: pjNormalBar, pjLineBar, or pjNoBar.
Pattern Optional Long The bar pattern. Can be one of the PjFillPattern constants.
Color Optional Long The bar color. Can be one of the PjColor constants.
Align Optional Long The justification of text in the bar. Can be one of the following PjAlignment constants: pjLeft, pjCenter, or pjRight.
Wrap Optional Boolean True if Project wraps text in the bar.
Shadow Optional Boolean True if the bar has a shadow.
Field1 Optional String The first field to display in the bar.
Field2 Optional String The second field to display in the bar.
Field3 Optional String The third field to display in the bar.
Field4 Optional String The fourth field to display in the bar.
Field5 Optional String The fifth field to display in the bar.
SplitPattern Optional Long The line pattern used to display split tasks. Can be one of the following PjLineType constants: pjNoLines, pjDash, pjCloseDot, pjContinuous, or pjDot.

Return Value
Boolean

Remarks

Specifying a value for any of

Field1

through

Field5

requires that any preceding

Field

arguments also be specified. For example, specifying

Field3

also requires

Field1

and

Field2

.

Example
The following example sets the Summary Bar as a Line Bar and the color to Purple.

Visual Basic for Applications
  Sub CalendarBar_StyleEdit()
'Activate Caldender view
ViewApply Name:="Calendar"
<strong class="bterm">CalendarBarStylesEdit</strong> Item:=pjBarSummary, Bar:=pjLineBar, Color:=pjPurple

End Sub

See Also