Click to Rate and Give Feedback
MSDN
MSDN Library
Office Development
Excel 2007
Application Object
 Application Object
Application Object
Represents the entire Microsoft Excel application.

Remarks

The Application object contains:

  • Application-wide settings and options.
  • Methods that return top-level objects, such as ActiveCell, ActiveSheet, and so on.

Example

Use the Application property to return the Application object. The following example applies the Windows property to the Application object.

Visual Basic for Applications
Application.Windows("book1.xls").Activate

The following example creates a Microsoft Excel workbook object in another application and then opens a workbook in Microsoft Excel.

Visual Basic for Applications
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

Visual Basic for Applications
Application.ActiveCell.Font.Bold = True
You can write
Visual Basic for Applications
ActiveCell.Font.Bold = True



Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content      
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker