CalendarDateBoxes Method
Customizes the date boxes in the Calendar.
Syntax
expression**.CalendarDateBoxes(TopLeft, TopRight, BottomLeft, BottomRight, TopColor, BottomColor, TopPattern, BottomPattern)**
*expression * Optional. An expression that returns an Application object.
PjCalendarDateLabel
Constant | Example date format |
---|---|
pjDay_mm_dd | 9/30, 10/1 |
pjDay_mm_dd_yy | 9/30/02, 10/1/02 |
pjDay_m_dd | S 30, O 1 |
pjDay_mmm_dd | Sep 30, Oct 1 |
pjDay_mmm_dd_yyy | Sep 30, '02; Oct 1, '02 |
pjDay_di | M, T |
pjDay_di_mm_dd | M 9/30, T 10/1 |
pjDay_di_dd | M 30, T 1 |
pjDay_di_m_dd | M S 30, T O 1 |
pjDay_didd | M30, T1 |
pjDay_ddi | Mo, Tu |
pjDay_ddi_mm_dd | Mo 9/30, Tu 10/1 |
pjDay_ddi_dd | Mo 30, Tu 1 |
pjDay_ddi_m_dd | Mo S 30, Tu O 1 |
pjDay_ddd | Mo, Tue |
pjDay_ddd_mm_dd | Mon 9/30, Tue 10/1 |
pjDay_ddd_mm_dd_yy | Mon 9/30/02; Tue 10/1/02 |
pjDay_ddd_dd | Mon 30, Tue 1 |
pjDay_ddd_m_dd | Mon S 30, Tue O 1 |
pjDay_ddd_mmm_dd | Mon Sep 30, Tue Oct 1 |
pjDay_ddd_mmm_dd_yyy | Mon Sep 30, '02; Tue Oct 1, '02 |
pjDay_ddd_mmmm_dd | Mon September 30, Tue October 1 |
pjDay_dddd | Tuesday, Wednesday |
pjDayFromEnd_dd | 4, 3 (the day from the end date of the project) |
pjDayFromEnd_Ddd | D4, D3 (the day from the end date of the project) |
pjDayFromEnd_Day_dd | Day 4, Day 3 (the day from the end date of the project) |
pjDayFromStart_dd | 1, 2 (the day from the start date of the project) |
pjDayFromStart_Ddd | D1, D2 (the day from the start date of the project) |
pjDayFromStart_Day_dd | Day 1, Day 2 (the day from the start date of the project) |
pjDayOfMonth_dd | 30, 1 (the day of the month) |
pjDayOfYear_dd | 273, 274 (the day of the year) |
pjDayOfYear_dd_yyyy | 273 2002, 274 2002 (the day of the year followed by the year) |
pjDayOfYear_dd_yyy | 273 '02, 274 '02 (the day of the year followed by the year) |
pjNoDateFormat | No date is displayed. |
PjOverflowIndicator | The overflow indicator is displayed. |
TopRight Optional Long. The format for dates in the upper-right corner of each date box. Can be one of the PjCalendarDateLabel constants.
BottomLeft Optional Long. The format for dates in the lower-left corner of each date box. Can be one of the PjCalendarDateLabel constants.
BottomRight Optional Long. The format for dates in the lower-right corner of each date box. Can be one of the PjCalendarDateLabel constants.
PjColor
pjColorAutomatic | pjNavy |
pjAqua | pjOlive |
pjBlack | pjPurple |
pjBlue | pjRed |
pjFuchsia | pjSilver |
pjGray | pjTeal |
pjGreen | pjYellow |
pjLime | pjWhite |
pjMaroon |
BottomColor Optional Long. The color of the bottom band in each date box. Can be one of the PjColor constants.
PjFillPattern
pjDarkFillPattern | pjLineCrossPattern |
pjDiagonalCrossPattern | pjLineHorizontalPattern |
pjDiagonalLeftPattern | pjLineVerticalPattern |
pjDiagonalRightPattern | pjMediumFillPattern |
pjHollowPattern | pjSolidFillPattern |
pjLightFillPattern |
BottomPattern Optional Long. The pattern of the bottom band in each date box. Can be one of the PjFillPattern constants.
Remarks
Using the CalendarDateBoxes method without specifying any arguments displays the Timescale dialog box with the Date Boxes tab selected.
Example
The following example displays the day of the week (for example, Thursday) in the upper-left corner of the calendar date boxes and the month and date (for example, Jan 31) in the upper-right corner of the calendar date boxes.
Sub FormatCalendarDays()
CalendarDateBoxes Topleft:=pjDay_dddd, TopRight:=pjDay_mmm_dd
End Sub
Applies to | Application Object
See Also | CalendarBarStyles Method | CalendarBarStylesEdit Method | CalendarBestFitWeekHeight Method | CalendarDateShading Method | CalendarDateShadingEdit Method | CalendarTaskList Method | CalendarTimescale Method | CalendarWeekHeadings Method