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

Application.BoxCellEditEx Method (Project)

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

Sets the properties of an individual cell in a data template for a Network Diagram view (PERT chart), where the font color can be specified with a hexadecimal value.

Syntax

expression. BoxCellEditEx( ** Name, ** Cell, ** FieldName, ** Font, ** FontSize, ** FontColor, ** Bold, ** Italic, ** Underline, ** HorizontalAlignment, ** VerticalAlignment, ** TextLineLimit, ** ShowLabel, ** Label, ** DateFormat** )

expression An expression that returns an Application object.

Parameters

NameRequired/OptionalData TypeDescription
NameRequiredStringThe name of the data template containing the cell to edit.
CellRequiredLongThe cell to edit. Can be one of the PjCell constants.
FieldNameOptionalLongThe name of the field to display in the cell. Can be one of the PjField constants.
FontOptionalStringThe name of the font.
FontSizeOptionalIntegerThe size of the font, in points.
FontColorOptionalLongThe RGB color of the font. Can be a hexadecimal value, where red is the last byte. For example, the value &;HFF0000 is blue and &;H00FFFF is yellow.
BoldOptionalBooleanTrue if the font is bold; otherwise, False.
ItalicOptionalBooleanTrue if the font is italic; otherwise, False.
UnderlineOptionalBooleanTrue if the font is underlined; otherwise, False.
HorizontalAlignmentOptionalLongSpecifies the horizontal alignment of text in the cell. Can be one of the PjAlignment constants.
VerticalAlignmentOptionalLongSpecifies the horizontal alignment of text in the cell. Can be one of the PjVerticalAlignment constants.
TextLineLimitOptionalLongSpecifies the limit for the number of lines of text in the cell. Values can be 1, 2, or 3.
ShowLabelOptionalBooleanTrue if a label is shown in the cell; otherwise, False.
LabelOptionalStringSpecifies the cell label.
DateFormatOptionalLongSpecifies the date format for the cell when FieldName is a date field. Can be one of the PjDateFormat constants.

Return Value

Boolean

Remarks

Using the BoxCellEditEx method with only the Name and Cell arguments has no effect.

Example

The following example modifies a copy of the Critical data template named Test Critical. The macro removes the fourth row of cells and sets the fourth cell in the third row to show the Actual Cost field and label in a purple-blue color.

Sub ModifyCriticalDataTemplate() 
 Application.BoxCellLayout Name:="Test Critical", CellRows:=3, MergeCells:=True 

 Application.BoxCellEditEx Name:="Test Critical", Cell:=pjCell4_3, _ 
 FieldName:=PjField.pjTaskActualCost, Font:="Arial", FontSize:="8", FontColor:=&;HFF0077, _ 
 Bold:=False, Italic:=False, Underline:=False, HorizontalAlignment:=pjLeft, _ 
 VerticalAlignment:=pjMiddle, TextLineLimit:=1, ShowLabel:=True, Label:="Cost" 
End Sub

Note If you use any of the PjColor enumeration constants for the FontColor parameter, the color will be nearly black. For example, the value of pjGreen is 9, which in the BoxCellEditEx method is a very dark red. To use only the sixteen colors available with PjColor constants, use the BoxCellEdit method.

© 2018 Microsoft