DetailStylesFormat Method

Sets the format of timescale data fields in a usage view.

Syntax

expression**.DetailStylesFormat(Item, Font, Size, Bold, Italic, Underline, Color, CellColor, Pattern, ShowInMenu)**

*expression   *     Optional. An expression that returns an Application object.

Item    Optional Long. The timescale data field to format.

PjTimescaledData

pjActualCost pjBaseline5Work
pjActualOvertimeWork pjBaseline6Work
pjActualWork pjBaseline7Work
pjACWP pjBaseline8Work
pjAllAssignmentRows pjBaseline9Work
pjAllResourceRows pjBaseline10Work
pjBaselineCost pjBCWP
pjBaseline1Cost pjBCWS
pjBaseline2Cost pjCost
pjBaseline3Cost pjCumulativeCost
pjBaseline4Cost pjCumulativeWork
pjBaseline5Cost pjCV
pjBaseline6Cost pjOverallocation
pjBaseline7Cost pjOvertimeWork
pjBaseline8Cost pjPeakUnits
pjBaseline9Cost pjPercentAllocation
pjBaseline10Cost pjRegularWork
pjBaselineWork pjRemainingAvailability
pjBaseline1Work pjSV
pjBaseline2Work pjUnitAvailability
pjBaseline3Work pjWork
pjBaseline4Work pjWorkAvailability

PjTimescaledData

pjActualCost pjBaseline7Work
pjActualFixedCost pjBaseline8Work
pjActualOvertimeWork pjBaseline9Work
pjActualWork pjBaseline10Work
pjACWP pjBCWP
pjAllAssignmentRows pjBCWS
pjAllTaskRows pjCPI
pjBaselineCost pjCost
pjBaseline1Cost pjCumPctComplete
pjBaseline2Cost pjCumulativeCost
pjBaseline3Cost pjCumulativeWork
pjBaseline4Cost pjCV
pjBaseline5Cost pjCVP
pjBaseline6Cost pjFixedCost
pjBaseline7Cost pjOverallocation
pjBaseline8Cost pjOvertimeWork
pjBaseline9Cost pjPctComplete
pjBaseline10Cost pjPeakUnits
pjBaselineWork pjPercentAllocation
pjBaseline1Work pjRegularWork
pjBaseline2Work pjSPI
pjBaseline3Work pjSV
pjBaseline4Work pjSVP
pjBaseline5Work pjWork
pjBaseline6Work  

Font    Optional String. The name of the font.

Size    Optional Integer. The size of the font in points.

Bold    Optional Boolean. True if the font is bold.

Italic    Optional Boolean. True if the font is italic.

Underline    Optional Boolean. True if the font is underlined.

PjColor

pjColorAutomatic pjNavy
pjAqua pjOlive
pjBlack pjPurple
pjBlue pjRed
pjFuchsia pjSilver
pjGray pjTeal
pjGreen pjYellow
pjLime pjWhite
pjMaroon  

CellColor    Optional Long. The color of the cell background. Can be one of the PjColor constants.

PjFillPattern

pjDarkFillPattern pjLineCrossPattern
pjDiagonalCrossPattern pjLineHorizontalPattern
pjDiagonalLeftPattern pjLineVerticalPattern
pjDiagonalRightPattern pjMediumFillPattern
pjHollowPattern pjSolidFillPattern
pjLightFillPattern  

ShowInMenu    Optional Boolean. True if the field specified with Item appears in the shortcut menu. The default value is False.

Remarks

Using the DetailStylesFormat method without specifying any arguments displays the Detail Styles dialog box with the Usage Details tab selected.

Example

The following example makes overallocations stand out from other information in a usage view.

Sub HighlightOverallocations()

    DetailStylesAdd pjOverallocation
    DetailStylesFormat Item:=pjOverallocation, Font:="Arial", Size:=12, _
        Bold:=True, Color:=pjRed, CellColor:=pjBlack, Pattern:=pjSolidFill

End Sub

Applies to | Application Object

See Also | DetailStylesAdd Method | DetailStylesProperties Method | DetailStylesRemove Method | DetailStylesRemoveAll Method | DetailStylesToggleItem Method | TimeScaleData Method