Objects as a collection, and changing the attributes of the entire collection
This recipe will take us one step further down the path of discovering objects.
It is common knowledge that a workbook is made up of any number of worksheets. These worksheet objects are of the same type and form a collection. Collections are objects in themselves.
There are, of course, more objects that form collections than just worksheets. Here is a list of other commonly used workbook objects:
- Workbooks: All currently open workbook objects form a collection.
- Worksheets: All worksheet objects contained in a particular workbook object constitute another collection.
- Charts: All chart objects/chart sheets contained in a particular workbook object are yet another collection.
- Sheets: All sheets, regardless of type, contained in a particular workbook object also form a collection.
Having this understanding of collections will be useful for all future recipes.