You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A collection is an ordered set of items. Unlike arrays where all members must have the same data type, collections do not have that restriction.
Add
Adds a new item to the collection. Clear Removes all items from the collection. Contains Checks whether an item is already part of the collection. Count Returns the number of items in the collection. Item Returns the item at the specified position. Remove Removes an item from the collection.
Clear
Sub Clear() Removes all items from the collection.
Add
Sub Add(item As Variant) Adds a new item to the collection. Parameters: item - item to be added
Item
Function Item(index As Integer) As Variant Returns the item at the specified position. Parameters: index - item position Returns: item
Count
Property Count As Integer Returns the number of items in the collection. This is a read-only property.
Contains
Function Contains(item As Variant) As Boolean Checks whether an item is already part of the collection. Parameters: item - item to look for Returns: True if the item is already in the collection
Remove
Sub Remove(item As Variant) Removes an item from the collection. Parameters: item - item to remove