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

Application.BoxCellEdit 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).

Syntax

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

expression A variable that represents 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 color of the font. Can be one of the PjColor constants.
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 BoxCellEdit method with only the Name and Cell arguments has no effect.

To edit a data template cell where the text color can be an RGB value, use the BoxCellEditEx method.

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 green color.

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

    Application.BoxCellEdit Name:="Test Critical", Cell:=pjCell4_3, _ 
        FieldName:=PjField.pjTaskActualCost, Font:="Arial", FontSize:="8", FontColor:=PjColor.pjGreen, _ 
        Bold:=False, Italic:=False, Underline:=False, HorizontalAlignment:=pjLeft, _ 
        VerticalAlignment:=pjMiddle, TextLineLimit:=1, ShowLabel:=True, Label:="Cost" 
End Sub
© 2018 Microsoft