ABSTRACT

Programming in Visual Basic for Applications (VBA) is related to manipulating the objects that make up Excel® and other Office applications. This chapter introduces the Excel object model and some commonly used Excel objects. After studying the chapter, readers will be able to understand the Excel object model, use the properties and methods of some common objects, such as Application, Workbook, Worksheet, Range, and WorksheetFunction. A special Excel object is the collection object, which contains objects of the same type. For example, the Workbooks object contains all currently open Workbook objects. The Worksheets object contains all Worksheet objects contained in a particular Workbook object. A Workbook object represents a Microsoft Excel workbook. A Workbook object is a member of the Workbooks collection, which contains all the Workbook objects currently open in Microsoft Excel. The Application object is the top-most object in the Excel object model. The Application object contains application-wide settings and options and top-level objects and methods.