method NonworkingPatterns.Add (ID as Long, Type as PatternEnum)
Adds a NonworkingPattern object to the collection and returns a reference to the newly created object.

TypeDescription
ID as Long A Long expression that defines the identifier of the colors/pattern to be used to show a non-working time-interval.
Type as PatternEnum A PatternEnum expression specifies the type of the pattern to be assigned to non-working time-interval.
ReturnDescription
NonworkingPatternA NonworkingPattern object being created. 
The Add method adds a color/pattern to be displayed on a non-working time-interval. The ID property of the NonworkingTime object defines the identifier of the pattern/color. The IDNonworkingPattern property indicates the identifier of the NonworkingPattern object to be displayed on the non-working interval. Each NonworkingTime object can associate a NonworkingPattern object that specifies the colors and the pattern to show the non-working zone. The ShowNonworkingTime property shows or hides the defined non-working intervals. The NonworkingTimeFromPoint property gets the non-working object from the cursor. The NonworkingPatterns collection is accessible through the NonworkingPatterns property of the control. The Add method of the NonworkingTimes objects adds a new non-working time interval.

The NonworkingTime's advantages are: