Application.ResourceGraphBarStyles method (Project)
Sets the styles of bars on the Resource Graph view.
Syntax
expression. ResourceGraphBarStyles
( _TopLeftShowAs_
, _TopLeftColor_
, _TopLeftPattern_
, _BottomLeftShowAs_
, _BottomLeftColor_
, _BottomLeftPattern_
, _TopRightShowAs_
, _TopRightColor_
, _TopRightPattern_
, _BottomRightShowAs_
, _BottomRightColor_
, _BottomRightPattern_
, _ShowValues_
, _ShowAvailabilityLine_
, _PercentBarOverlap_
, _ProposedLeftShowAs_
, _ProposedLeftColor_
, _ProposedLeftPattern_
, _ProposedRightShowAs_
, _ProposedRightColor_
, _ProposedRightPattern_
)
expression A variable that represents 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 one of the PjColor constants. |
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 one of the PjColor constants. |
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 one of the PjColor constants. |
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 one of the PjColor constants. |
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 one of the PjColor constants. |
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 one of the PjColor constants. |
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 ResourceGraphBarStyles method without specifying any arguments displays the Bar Styles dialog box.
To edit the resource graph styles where the colors can be specified as hexadecimal RGB values, use the ResourceGraphBarStylesEx method
Example
The following line of code sets proposed resources in the Resource Graph view as a step line in a blue-green color.
Application.ResourceGraphBarStylesEx ProposedRightShowAs:=pjStepLine, ProposedRightColor:=pjTeal
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.