Pages Menu
Categories Menu

Posted by on Sep 4, 2013 in Tutorials | 0 comments

Overview of the Excel Object Model

Overview of the Excel Object Model

 

The Excel object model closely follows that of the User Interface (UI) making the transition from end user to developer much easier.  At the top of the object model we have the Application object.  This object contains application wide settings (ie. many of the options found in the options dialog under the tools menu), as well as properties like ActiveSheet and ActiveCell.

Within the Application object is a collection of workbooks, each containing a collection of Worksheets.  Worksheets posses many of the same properties, methods and events of the Application and Workbook objects, while in addition, allowing access to Range objects.  These Range objects are very power and are what most developers spend their time programming against.  Ranges in VBA can represent several things, including: Cells, Rows, Columns and Selections.  By accessing the properties of a Range object it is possible to programmaticly change things like formulas, values, text formatting, cell formatting etc.

While many other object types exist in Excel, the Application, Workbook, Worksheet and Range classes are the most important.

Related Articles: