Exceptions.Add method (Project)

Adds an Exception object to an Exceptions collection.

Syntax

expression.Add (Type, Start, Finish, Occurrences, Name, Period, DaysOfWeek, MonthPosition, MonthItem, Month, MonthDay)

expression A variable that represents an 'Exceptions' object.

Parameters

Name Required/Optional Data type Description
Type Required Long Exception type. Can be one of the PjExceptionType constants.
Start Required Variant Start date of the exception.
Finish Optional Variant Finish date of the exception.
Occurrences Optional Long Number of occurrences.
Name Optional String Name of the Exception object
Period Optional Long Number for exception recurrence.
DaysOfWeek Optional Long The days on which the exception occurs. Can be a combination of PjWeekday constants.
MonthPosition Optional Long Value for the Monthly type exceptions. Can be one of the PjExceptionPosition contants.
MonthItem Optional Long Value for the Monthly type exceptions. Can be one of the following PjExceptionItem constants: pjSunday, pjMonday, pjTuesday, pjWednesday, pjThursday, pjFriday, and pjSaturday.
Month Optional Long Specifies the month, if the Type argument is pjYearlyMonthDay or pjYearlyPositional. Can be one of the pjMonth constants.
MonthDay Optional Long Day of month for ByMonthDay type exceptions.

Return value

Exception

See also

Exceptions Collection Object

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.