BaseCalendarEditDays Method

Changes one or more days in a base calendar.

expression**.BaseCalendarEditDays(Name, StartDate, EndDate, WeekDay, Working, From1, To1, From2, To2, From3, To3, Default, From4, To4, From5, To5)**

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

Name Required String. The name of the base calendar to change.

StartDate     Optional Variant. The first date to change. If StartDate is specified without EndDate, that date is the only day affected. If WeekDay is specified, StartDate is ignored.

EndDate     Optional Variant. The last date to change. If EndDate is specified without StartDate, that date is the only day affected. If WeekDay is specified, EndDate is ignored.

WeekDay     Optional Long. The weekday to change. If StartDate or EndDate is specified, WeekDay is ignored. Can be one of the following PjWeekday constants: pjSunday, pjMonday, pjTuesday, pjWednesday, pjThursday, pjFriday, or pjSaturday.

Working     Optional Boolean. True if the days are working days.

From1     Optional Variant. The start time of the first shift.

To1     Optional Variant. The end time of the first shift.

From2     Optional Variant. The start time of the second shift.

To2     Optional Variant. The end time of the second shift.

From3     Optional Variant. The start time of the third shift.

To3     Optional Variant. The end time of the third shift.

Default     Optional Boolean. Resets the dates specified by StartDate and EndDate, or by WeekDay, to the default values. If Working is specified, Default is ignored.

From4     Optional Variant. The start time of the fourth shift.

To4     Optional Variant. The end time of the fourth shift.

From5     Optional Variant. The start time of the fifth shift.

To5     Optional Variant. The end time of the fifth shift.

Example

The following example makes Wednesday a nonworking day in the Standard calendar.

Sub MakeWednesdaysNonWorking()
    BaseCalendarEditDays Name:="Standard", Weekday:=pjWednesday, Working:=False
End Sub

The following example makes the days from 2/10/97 through 2/12/97 nonworking days in the Standard calendar.

Sub MakeSelectedDaysNonWorking()
    BaseCalendarEditDays Name:="Standard", StartDate:="2/10/97", EndDate:="2/12/97", Working:=False
End Sub

Applies to | Application Object

See Also | BaseCalendarCreate Method | BaseCalendarDelete Method | BaseCalendarRename Method | BaseCalendarReset Method | BaseCalendars Method | ChangeWorkingTime Method