Collections are another key concept in VBA programming. A collection is a group of objects of the same type. And to add to the confusion, a collection is itself an object.
Here are a few examples of commonly used collections:
i Workbooks: A collection of all currently open Workbook objects i Worksheets: A collection of all Worksheet objects contained in a particular Workbook object i Charts: A collection of all Chart objects (chart sheets) contained in a particular Workbook object i Sheets: A collection of all sheets (regardless of their type) contained in a particular Workbook object
You may notice that collection names are all plural, which makes sense (at least I hope).
1. Activate the VBE.
2. Type Object Model in the Help box (located to the right of the menu bar).
The Search Results appear in the task pane.
3. Click Microsoft Excel Object model. You see the diagram shown here.
Was this article helpful?