Reference > HolidayStylesCollection Object > HolidayStylesCollection Methods > Remove Method (HolidayStylesCollection) |
Remove Method (HolidayStylesCollection)
Removes a specific object from the collection.
object.RemoveIndex
index is a required variant, an integer or string that uniquely identifies an object within the collection. Use an integer to specify the value of the Index property; use a string to specify the value of the Key:objects property.
None
If you are using this with the SelectionsCollection, the Remove method removes the date specified by the index argument, then decrements the Selections.Count property by 1. If the date removed from the Selections collection is visible, it will be deselected in the current view of the calendar control.
If you specify an index number out of bounds, or a date string expression that does not exist in the Selections collection, a trappable error will occur.
With a holiday selected, if the SelectWhat property is set to 1-Workday, and the holiday will be automatically removed from the Selections collection. In the same way, a workday will be deselected and removed from the Selections collection when setting the SelectWhat property to 2-Holiday.
To remove all the members of a collection, use the Clear method.