Application Object [Excel 2003 VBA Language Reference]

Application
Multiple objects

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.

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.

Set xl = CreateObject("Excel.Sheet")
xl.Application.Workbooks.Open "newbook.xls"

Remarks

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.

Properties | ActiveCell Property | ActiveChart Property | ActivePrinter Property | ActiveSheet Property | ActiveWindow Property | ActiveWorkbook Property | AddIns Property | AlertBeforeOverwriting Property | AltStartupPath Property | AnswerWizard Property | Application Property | ArbitraryXMLSupportAvailable Property | AskToUpdateLinks Property | Assistant Property | AutoCorrect Property | AutoFormatAsYouTypeReplaceHyperlinks Property | AutomationSecurity Property | AutoPercentEntry Property | AutoRecover Property | Build Property | CalculateBeforeSave Property | Calculation Property | CalculationInterruptKey Property | CalculationState Property | CalculationVersion Property | Caller Property | CanPlaySounds Property | CanRecordSounds Property | Caption Property | CellDragAndDrop Property | Cells Property | Charts Property | ClipboardFormats Property | Columns Property | COMAddIns Property | CommandBars Property | CommandUnderlines Property | ConstrainNumeric Property | ControlCharacters Property | CopyObjectsWithCells Property | Creator Property | Cursor Property | CursorMovement Property | CustomListCount Property | CutCopyMode Property | DataEntryMode Property | DDEAppReturnCode Property | DecimalSeparator Property | DefaultFilePath Property | DefaultSaveFormat Property | DefaultSheetDirection Property | DefaultWebOptions Property | Dialogs Property | DisplayAlerts Property | DisplayClipboardWindow Property | DisplayCommentIndicator Property | DisplayDocumentActionTaskPane Property | DisplayExcel4Menus Property | DisplayFormulaBar Property | DisplayFullScreen Property | DisplayFunctionToolTips Property | DisplayInsertOptions Property | DisplayNoteIndicator Property | DisplayPasteOptions Property | DisplayRecentFiles Property | DisplayScrollBars Property | DisplayStatusBar Property | EditDirectlyInCell Property | EnableAnimations Property | EnableAutoComplete Property | EnableCancelKey Property | EnableEvents Property | EnableSound Property | ErrorCheckingOptions Property | Excel4IntlMacroSheets Property | Excel4MacroSheets Property | ExtendList Property | FeatureInstall Property | FileConverters Property | FileDialog Property | FileFind Property | FileSearch Property | FindFormat Property | FixedDecimal Property | FixedDecimalPlaces Property | GenerateGetPivotData Property | Height Property | Hinstance Property | Hwnd Property | IgnoreRemoteRequests Property | Interactive Property | International Property | Iteration Property | LanguageSettings Property | Left Property | LibraryPath Property | MailSession Property | MailSystem Property | MapPaperSize Property | MathCoprocessorAvailable Property | MaxChange Property | MaxIterations Property | MouseAvailable Property | MoveAfterReturn Property | MoveAfterReturnDirection Property | Name Property | Names Property | NetworkTemplatesPath Property | NewWorkbook Property | ODBCErrors Property | ODBCTimeout Property | OLEDBErrors Property | OnWindow Property | OperatingSystem Property | OrganizationName Property | Parent Property | Path Property | PathSeparator Property | PivotTableSelection Property | PreviousSelections Property | ProductCode Property | PromptForSummaryInfo Property | Range Property | Ready Property | RecentFiles Property | RecordRelative Property | ReferenceStyle Property | RegisteredFunctions Property | ReplaceFormat Property | RollZoom Property | Rows Property | RTD Property | ScreenUpdating Property | Selection Property | Sheets Property | SheetsInNewWorkbook Property | ShowChartTipNames Property | ShowChartTipValues Property | ShowStartupDialog Property | ShowToolTips Property | ShowWindowsInTaskbar Property | SmartTagRecognizers Property | Speech Property | SpellingOptions Property | StandardFont Property | StandardFontSize Property | StartupPath Property | StatusBar Property | TemplatesPath Property | ThisCell Property | ThisWorkbook Property | ThousandsSeparator Property | Top Property | TransitionMenuKey Property | TransitionMenuKeyAction Property | TransitionNavigKeys Property | UsableHeight Property | UsableWidth Property | UsedObjects Property | UserControl Property | UserLibraryPath Property | UserName Property | UseSystemSeparators Property | Value Property | VBE Property | Version Property | Visible Property | Watches Property | Width Property | Windows Property | WindowsForPens Property | WindowState Property | Workbooks Property | WorksheetFunction Property | Worksheets Property

Methods | ActivateMicrosoftApp Method | AddChartAutoFormat Method | AddCustomList Method | Calculate Method | CalculateFull Method | CalculateFullRebuild Method | CentimetersToPoints Method | CheckAbort Method | CheckSpelling Method | ConvertFormula Method | DDEExecute Method | DDEInitiate Method | DDEPoke Method | DDERequest Method | DDETerminate Method | DeleteChartAutoFormat Method | DeleteCustomList Method | DisplayXMLSourcePane Method | DoubleClick Method | Evaluate Method | ExecuteExcel4Macro Method | FindFile Method | GetCustomListContents Method | GetCustomListNum Method | GetOpenFilename Method | GetPhonetic Method | GetSaveAsFilename Method | Goto Method | Help Method | InchesToPoints Method | InputBox Method | Intersect Method | MacroOptions Method | MailLogoff Method | MailLogon Method | NextLetter Method | OnKey Method | OnRepeat Method | OnTime Method | OnUndo Method | Quit Method | RecordMacro Method | RegisterXLL Method | Repeat Method | Run Method | SaveWorkspace Method | SendKeys Method | SetDefaultChart Method | Undo Method | Union Method | Volatile Method | Wait Method

Events | NewWorkbook Event | SheetActivate Event | SheetBeforeDoubleClick Event | SheetBeforeRightClick Event | SheetCalculate Event | SheetChange Event | SheetDeactivate Event | SheetFollowHyperlink Event | SheetPivotTableUpdate Event | SheetSelectionChange Event | WindowActivate Event | WindowDeactivate Event | WindowResize Event | WorkbookActivate Event | WorkbookAddinInstall Event | WorkbookAddinUninstall Event | WorkbookAfterXmlExport Event | WorkbookAfterXmlImport Event | WorkbookBeforeClose Event | WorkbookBeforePrint Event | WorkbookBeforeSave Event | WorkbookBeforeXmlExport Event | WorkbookBeforeXmlImport Event | WorkbookDeactivate Event | WorkbookNewSheet Event | WorkbookOpen Event | WorkbookPivotTableCloseConnection Event | WorkbookPivotTableOpenConnection Event | WorkbookSync Event

Parent Objects

Child Objects | AddIns Object | Application Object | AutoCorrect Object | AutoRecover Object | CellFormat Object | Chart Object | DefaultWebOptions Object | Dialogs Object | ErrorCheckingOptions Object | Names Object | ODBCErrors Object | OLEDBErrors Object | Range Object | RecentFiles Object | RTD Object | Sheets Object | SmartTagRecognizers Object | Speech Object | SpellingOptions Object | UsedObjects Object | Watches Object | Window Object | Windows Object | Workbook Object | Workbooks Object | WorksheetFunction Object

See Also | Controlling One Microsoft Office Application from Another | OLE Programmatic Identifiers