Add Method

Applies To   See Also  

Adds a calendar day to the collection.

Syntax
Function Add(
    StartDay As Long,
    StartMonth As Long,
    StartYear As Long,
    EndDay As Long,
    EndMonth As Long,
    EndYear As Long,
    [DayOfWeek As CeDayOfWeek = ceDayAll],
    [WeekOfMonth As Long]) As CalendarDay
Parameters

StartDay

The day of the month on which the schedule will begin running. StartDay can be a value from 1-31.

StartMonth

The month in which the schedule will begin running. StartMonth can be a value from 1-12.

StartYear

The year in which the schedule will begin running. StartYear can be any valid year.

EndDay

The day of the month on which the schedule will stop running.

EndMonth

The month in which the schedule will stop running.

EndYear

The year in which the schedule will stop running.

DayOfWeek

The day(s) on which the job will be processed. The value can be set to a specific day or to all days of the week. By default, the value is 0, which means that the job will be run every day of the week.

WeekOfMonth

The specific week in which the job will be processed. 1 is the first week of the month; 5 is the last week. 0 is every week. By default, the job will be run every week of the month.

Remarks

The schedule will start running when all of the conditions are true. When you specify 0 for the StartDay, StartMonth, or StartYear, the current day, current month, or current year will replace that value. When you specify 0 for any of the End parameters, then again the values will be replaced with the current day, current month, or current year.

For example:



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com