Table of contents
TOC
Collapse the table of content
Expand the table of content

Application.GanttBarEditEx Method (Project)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Changes or creates a Gantt bar style, where colors can be hexadecimal values.

Syntax

expression. GanttBarEditEx( ** Item, ** Create, ** Name, ** StartShape, ** StartType, ** StartColor, ** MiddleShape, ** MiddleColor, ** MiddlePattern, ** EndShape, ** EndType, ** EndColor, ** ShowFor, ** Row, ** From, ** To, ** BottomText, ** TopText, ** LeftText, ** RightText, ** InsideText** )

expression An expression that returns an Application object.

Parameters

NameRequired/OptionalData TypeDescription
ItemRequiredStringThe name or row number of the Gantt bar style to change in the Bar Styles dialog box.
CreateOptionalBooleanTrue if a new Gantt bar style is created and inserted in the Bar Styles dialog box before the Gantt bar style specified with Item. If Item is "-1", the new Gantt bar style is added to the end of the list of styles. The default value is False.
NameOptionalStringA new name for the Gantt bar.
StartShapeOptionalIntegerThe start shape of the Gantt bar. The default value is pjNone. Can be one of the PjBarEndShape constants.
StartTypeOptionalIntegerThe start type of the Gantt bar. Can be one of the following PjBarType constants: pjDashed, pjFramed, or pjSolid. The default value is pjSolid.
StartColorOptionalLongThe start color of the Gantt bar. Can be a hexadecimal RGB value, where red is the last byte. For example, &;H00FFFF is yellow. The default value is &;H0 (black).
MiddleShapeOptionalIntegerThe middle shape of the Gantt bar. Can be one of the PjBarShape constants. The default value is pjRectangleBar.
MiddleColorOptionalLongThe middle color of the Gantt bar. Can be a hexadecimal RGB value, where red is the last byte. For example, &;HFFFF00 is blue-green. The default value is &;H0 (black).
MiddlePatternOptionalIntegerThe middle pattern of the Gantt bar. Can be one of the PjFillPattern constants. The default value is pjMediumFillPattern.
EndShapeOptionalIntegerThe end shape of the Gantt bar. Can be one of the PjBarEndShape constants. The default value is pjNone.
EndTypeOptionalIntegerThe end type of the Gantt bar. Can be one of the following PjBarType constants: pjDashed, pjFramed, or pjSolid. The default value is pjSolid.
EndColorOptionalLongThe end color of the Gantt bar. Can be a hexadecimal RGB value, where red is the last byte. The default value is &;H0 (black).
ShowForOptionalStringOne or more task types (such as normal, split, summary, milestone, and so on) separated by the list separator character.
RowOptionalIntegerA number from 1 to 4 that specifies the row in which the Gantt bar appears. The default value is 1.
FromOptionalStringThe name of a date field specifying the start of the Gantt bar.
ToOptionalStringThe name of a date field specifying the end of the Gantt bar.
BottomTextOptionalStringThe task field to display below the Gantt bar.
TopTextOptionalStringThe task field to display above the Gantt bar.
LeftTextOptionalStringThe task field to display to the left of the Gantt bar.
RightTextOptionalStringThe task field to display to the right of the Gantt bar.
InsideTextOptionalStringThe task field to display inside the Gantt bar.

Return Value

Boolean

Remarks

To manually show the Bar Styles dialog box, click the Format tab under the Gantt Chart Tools tab. In the Bar Styles group, click Bar Styles in the Format drop-down list. The Bar Styles dialog box can contain up to 200 style entries.

Example

The following example creates a bar style that has a light green color and ends with a star shape.

Sub CreateGanttBar() 
    GanttBarEditEx Item:=-1, Create:=True, Name:="My New Bar Style", _
        MiddleColor:=&;H88FF88, EndShape:=pjStar 
End Sub
© 2018 Microsoft