Application.ResourceGraphBarStylesEx method (Project)
Sets the styles of bars on the Resource Graph view, where colors can be hexadecimal values.
Syntax
expression. ResourceGraphBarStylesEx
( _TopLeftShowAs_
, _TopLeftColor_
, _TopLeftPattern_
, _BottomLeftShowAs_
, _BottomLeftColor_
, _BottomLeftPattern_
, _TopRightShowAs_
, _TopRightColor_
, _TopRightPattern_
, _BottomRightShowAs_
, _BottomRightColor_
, _BottomRightPattern_
, _ShowValues_
, _ShowAvailabilityLine_
, _PercentBarOverlap_
, _ProposedLeftShowAs_
, _ProposedLeftColor_
, _ProposedLeftPattern_
, _ProposedRightShowAs_
, _ProposedRightColor_
, _ProposedRightPattern_
)
expression An expression that returns an Application object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
TopLeftShowAs | Optional | Integer | The bar type for the overallocated resources category in the upper-left corner of the Bar Styles dialog box. Can be one of the following PjResourceGraphStyle constants: pjBar, pjArea, pjStep, pjLine, pjStepLine, or pjDoNotShow. |
TopLeftColor | Optional | Integer | The bar color for the overallocated resources category in the upper-left corner of the Bar Styles dialog box. Can be a hexadecimal value, where red is the last byte. For example, the value &HFF0000 is blue and &H00FFFF is yellow. |
TopLeftPattern | Optional | Integer | The bar pattern for the overallocated resources category in the upper-left corner of the Bar Styles dialog box. Can be one of the PjResourceGraphPattern constants. |
BottomLeftShowAs | Optional | Integer | The bar type for the allocated resources category (the middle left section) of the Bar Styles dialog box. Can be one of the PjResourceGraphStyle constants. |
BottomLeftColor | Optional | Integer | The bar color for the allocated resources category (the middle left section) of the Bar Styles dialog box. Can be a hexadecimal value, where red is the last byte. For example, the value &HFF00 is green. |
BottomLeftPattern | Optional | Integer | The bar pattern for the allocated resources category (the middle left section) of the Bar Styles dialog box. Can be one of the PjResourceGraphPattern constants. |
TopRightShowAs | Optional | Integer | The bar type for the overallocated resources category in the upper-right corner of the Bar Styles dialog box. Can be one of the PjResourceGraphStyle constants. |
TopRightColor | Optional | Integer | The bar color for the overallocated resources category in the upper-right corner of the Bar Styles dialog box. Can be a hexadecimal value, where red is the last byte. |
TopRightPattern | Optional | Integer | The bar pattern for the overallocated resources category in the upper-right corner of the Bar Styles dialog box. Can be one of the PjResourceGraphPattern constants. |
BottomRightShowAs | Optional | Integer | The bar type for the allocated resources category (the middle right section) of the Bar Styles dialog box. Can be one of the PjResourceGraphStyle constants. |
BottomRightColor | Optional | Integer | The bar color for the allocated resources category (the middle right section) of the Bar Styles dialog box. Can be a hexadecimal value, where red is the last byte. |
BottomRightPattern | Optional | Integer | The bar pattern for the allocated resources category (the middle right section) of the Bar Styles dialog box. Can be one of the PjResourceGraphPattern constants. |
ShowValues | Optional | Boolean | True if the corresponding values appear below the bars. |
ShowAvailabilityLine | Optional | Boolean | True if a horizontal line appears where a resource reaches its maximum availability. |
PercentBarOverlap | Optional | Integer | A number from 0 to 100 that specifies the overlap percentage of displayed bars. |
ProposedLeftShowAs | Optional | Integer | The bar type for the proposed bookings category in the bottom left section of the Bar Styles dialog box. Can be one of the PjResourceGraphStyle constants. |
ProposedLeftColor | Optional | Integer | The bar color for the proposed bookings category in the bottom left section of the Bar Styles dialog box. Can be a hexadecimal value, where red is the last byte. |
ProposedLeftPattern | Optional | Integer | The bar pattern for the proposed bookings category in the bottom left section of the Bar Styles dialog box. Can be one of the PjResourceGraphPattern constants. |
ProposedRightShowAs | Optional | Integer | The bar type for the proposed bookings category in the bottom right section of the Bar Styles dialog box. Can be one of the PjResourceGraphStyle constants. |
ProposedRightColor | Optional | Integer | The bar color for the proposed bookings category in the bottom right section of the Bar Styles dialog box. Can be a hexadecimal value, where red is the last byte. |
ProposedRightPattern | Optional | Integer | The bar pattern for the proposed bookings category in the bottom right section of the Bar Styles dialog box. Can be one of the PjResourceGraphPattern constants. |
Return value
Boolean
Remarks
Using the ResourceGraphBarStylesEx method without specifying any arguments displays the Bar Styles dialog box.
Note
If you use any of the PjColor enumeration constants for the color parameters, the color will be nearly black. For example, the value of pjGreen is 9, which in the ResourceGraphBarStylesEx method is a very dark red. To use only the sixteen colors available with PjColor constants, use the ResourceGraphBarStyles method.
Example
The following line of code sets proposed resources in the Resource Graph view as a step line in a light blue-green color.
Application.ResourceGraphBarStylesEx ProposedRightShowAs:=pjStepLine, ProposedRightColor:=&HD0FF00
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.