This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Represents the entire Microsoft Excel application. The Application object contains:
- Application-wide settings and options (many of the options in the Options dialog box (Tools menu), for example).
- Methods that return top-level objects, such as ActiveCell, ActiveSheet, and so on.
Using the Application Object
Use the Application property to return the Application object. The following example applies the Windows property to the Application object.
The following example creates a Microsoft Excel workbook object in another application and then opens a workbook in Microsoft Excel.
Set xl = CreateObject("Excel.Sheet") xl.Application.Workbooks.Open "newbook.xls"
Many of the properties and methods that return the most common user-interface objects, such as the active cell (ActiveCell property), can be used without the Application object qualifier. For example, instead of writing
Application.ActiveCell.Font.Bold = True, you can write
ActiveCell.Font.Bold = True.