Working with Microsoft Excel Objects
The Microsoft® Excel object model contains several dozen objects that you can manipulate through Microsoft® Visual Basic® for Applications (VBA) code. Almost anything you can do with Excel from its user interface, you can do by manipulating its objects through VBA. In addition, you can do things through VBA that can't be done through the user interface.
When you use VBA to work with Excel objects, from either within Excel itself or another Office application, you have access to every part of Excel. The objects you will work with include cells, ranges, sheets, workbooks, charts, and more. In other words, every element in Excel can be represented by an object that you can manipulate through VBA.
There are four Excel objects you will work with more than any others: the Application object, the Workbook object, the Worksheet object, and the Range object.
In This Section
- Understanding the Excel Application Object
Use the Microsoft® Excel Application object to determine or specify application-level properties or execute application-level methods. - Understanding the Workbook Object
Work with the Workbook object to use with a single Microsoft® Excel workbook, and use the Workbooks collection to work with all currently open Workbook objects. - Understanding the Worksheet Object
Use a worksheet, containing a grid of cells, to work with data and hundreds of properties, methods, and events. - Understanding the Range Object
Develop a full understanding of the Range object and how to use it effectively in Microsoft® Visual Basic® for Applications (VBA) procedures and harness the power of Microsoft® Excel.
Related Sections
- Working with Office Applications
Take advantage of different objects, collections of objects, properties, methods, and events to build your application. - Working with Microsoft Access Objects
Use Form, Report, and DataAccessPage objects and the controls they contain to format and display data and make it possible to add or edit data in a database. - Working with Microsoft FrontPage Objects
Create, deploy, modify, and manage Web sites using Microsoft ®FrontPage®. - Working with Microsoft Outlook Objects
Create custom Outlook objects and manipulate those objects from within Microsoft® Outlook® or from another application using Microsoft® Visual Basic® for Applications (VBA) code from within Outlook or another Microsoft® Office XP application by using Automation. - Working with Microsoft PowerPoint Objects
Automate Microsoft® PowerPoint® by using the Application object, from which you can open an existing Presentation object or create a new presentation. - Working with Microsoft Project Objects
Build powerful custom applications easily with the Microsoft® Project object model. - Working with Microsoft Word Objects
Use Microsoft® Visual Basic® for Applications (VBA) to work with the Microsoft® Word Document object, Application object, and Documents collection. - Working with Microsoft Visio Objects
Design, model, and manage complex enterprise-level systems with the sophisticated toolset provided by Microsoft® Visio® products.