Collections. A collection is a way of grouping a set of related items. Properties and Methods a Collection. How is a Collection stored?. A Collection object stores each item in a Variant. The list of things you can add to a Collection object is the
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
A collection is a way of grouping a set of related items.
Properties and Methods a Collection
Use the Item method to retrieve specific items from a collection.
The syntax is:
[Set] variable = object.Item(index)
Set woCurrent = colWorkOrders.Item(3)
Set woCurrent = colWorkOrders.Item("W017493")
Item is the default method
Set woCurrent = colWorkOrders(3)
Set woCurrent = colWorkOrders ("W017493")
colWorkOrders("W017493").Priority = 3
Creating your own collection class
The most robust way to implement a collection is by making it a class module .
Create a class that is a wrapper around a collection.
The student/courses project demonstrates this.
colCourses is a container for
objects of type clsCourse