Objeto de aplicativo (Excel)
Representa o aplicativo inteiro do Microsoft Excel.
Exemplo
Use a propriedade Application para retornar o objeto Application. O seguinte exemplo aplica a propriedade Windows no objeto Application.
Application.Windows("book1.xls").Activate
O exemplo a seguir cria um objeto de pasta de trabalho do Excel em outro aplicativo e então abre uma pasta de trabalho no Excel.
Set xl = CreateObject("Excel.Sheet")
xl.Application.Workbooks.Open "newbook.xls"
Várias das propriedades e dos métodos que retornam os objetos mais comuns da interface do usuário, como a célula ativa (propriedade ActiveCell), poderão ser usadas sem o qualificador de objeto Application. Por exemplo, em vez de escrever:
Application.ActiveCell.Font.Bold = True
Você pode gravar:
ActiveCell.Font.Bold = True
Comentários
O objeto Application contém:
- Configurações e opções de todo o aplicativo.
- Os métodos que retornam objetos de nível superior, como ActiveCell, ActiveSheet e assim por diante.
Eventos
- AfterCalculate
- NewWorkbook
- ProtectedViewWindowActivate
- ProtectedViewWindowBeforeClose
- ProtectedViewWindowBeforeEdit
- ProtectedViewWindowDeactivate
- ProtectedViewWindowOpen
- ProtectedViewWindowResize
- SheetActivate
- SheetBeforeDelete
- SheetBeforeDoubleClick
- SheetBeforeRightClick
- SheetCalculate
- SheetChange
- SheetDeactivate
- SheetFollowHyperlink
- SheetLensGalleryRenderComplete
- SheetPivotTableAfterValueChange
- SheetPivotTableBeforeAllocateChanges
- SheetPivotTableBeforeCommitChanges
- SheetPivotTableBeforeDiscardChanges
- SheetPivotTableUpdate
- SheetSelectionChange
- SheetTableUpdate
- WindowActivate
- WindowDeactivate
- WindowResize
- WorkbookActivate
- WorkbookAddinInstall
- WorkbookAddinUninstall
- WorkbookAfterSave
- WorkbookAfterXmlExport
- WorkbookAfterXmlImport
- WorkbookBeforeClose
- WorkbookBeforePrint
- WorkbookBeforeSave
- WorkbookBeforeXmlExport
- WorkbookBeforeXmlImport
- WorkbookDeactivate
- WorkbookModelChange
- WorkbookNewChart
- WorkbookNewSheet
- WorkbookOpen
- WorkbookPivotTableCloseConnection
- WorkbookPivotTableOpenConnection
- WorkbookRowsetComplete
- WorkbookSync
Métodos
- ActivateMicrosoftApp
- AddCustomList
- Calculate
- CalculateFull
- CalculateFullRebuild
- CalculateUntilAsyncQueriesDone
- CentimetersToPoints
- CheckAbort
- CheckSpelling
- ConvertFormula
- DDEExecute
- DDEInitiate
- DDEPoke
- DDERequest
- DDETerminate
- DeleteCustomList
- DisplayXMLSourcePane
- DoubleClick
- Evaluate
- ExecuteExcel4Macro
- FindFile
- GetCustomListContents
- GetCustomListNum
- GetOpenFilename
- GetPhonetic
- GetSaveAsFilename
- Goto
- Help
- InchesToPoints
- InputBox
- Intersect
- MacroOptions
- MailLogoff
- MailLogon
- NextLetter
- OnKey
- OnRepeat
- OnTime
- OnUndo
- Quit
- RecordMacro
- RegisterXLL
- Repeat
- Run
- SendKeys
- SharePointVersion
- Undo
- Union
- Volatile
- Wait
Propriedades
- ActiveCell
- ActiveChart
- ActiveEncryptionSession
- ActivePrinter
- ActiveProtectedViewWindow
- ActiveSheet
- ActiveWindow
- ActiveWorkbook
- AddIns
- AddIns2
- AlertBeforeOverwriting
- AltStartupPath
- AlwaysUseClearType
- Application
- ArbitraryXMLSupportAvailable
- AskToUpdateLinks
- Assistance
- AutoCorrect
- AutoFormatAsYouTypeReplaceHyperlinks
- AutomationSecurity
- AutoPercentEntry
- AutoRecover
- Build
- CalculateBeforeSave
- Calculation
- CalculationInterruptKey
- CalculationState
- CalculationVersion
- Caller
- CanPlaySounds
- CanRecordSounds
- Caption
- CellDragAndDrop
- Cells
- ChartDataPointTrack
- Charts
- ClipboardFormats
- ClusterConnector
- Columns
- COMAddIns
- CommandBars
- CommandUnderlines
- ConstrainNumeric
- ControlCharacters
- CopyObjectsWithCells
- Creator
- Cursor
- CursorMovement
- CustomListCount
- CutCopyMode
- DataEntryMode
- DDEAppReturnCode
- DecimalSeparator
- DefaultFilePath
- DefaultSaveFormat
- DefaultSheetDirection
- DefaultWebOptions
- DeferAsyncQueries
- Dialogs
- DisplayAlerts
- DisplayClipboardWindow
- DisplayCommentIndicator
- DisplayDocumentActionTaskPane
- DisplayDocumentInformationPanel
- DisplayExcel4Menus
- DisplayFormulaAutoComplete
- DisplayFormulaBar
- DisplayFullScreen
- DisplayFunctionToolTips
- DisplayInsertOptions
- DisplayNoteIndicator
- DisplayPasteOptions
- DisplayRecentFiles
- DisplayScrollBars
- DisplayStatusBar
- EditDirectlyInCell
- EnableAnimations
- EnableAutoComplete
- EnableCancelKey
- EnableCheckFileExtensions
- EnableEvents
- EnableLargeOperationAlert
- EnableLivePreview
- EnableMacroAnimations
- EnableSound
- ErrorCheckingOptions
- Excel4IntlMacroSheets
- Excel4MacroSheets
- ExtendList
- FeatureInstall
- FileConverters
- FileDialog
- FileExportConverters
- FileValidation
- FileValidationPivot
- FindFormat
- FixedDecimal
- FixedDecimalPlaces
- FlashFill
- FlashFillMode
- FormulaBarHeight
- GenerateGetPivotData
- GenerateTableRefs
- Height
- HighQualityModeForGraphics
- Hinstance
- HinstancePtr
- Hwnd
- IgnoreRemoteRequests
- Interactive
- International
- IsSandboxed
- Iteration
- LanguageSettings
- LargeOperationCellThousandCount
- Left
- LibraryPath
- MailSession
- MailSystem
- MapPaperSize
- MathCoprocessorAvailable
- MaxChange
- MaxIterations
- MeasurementUnit
- MergeInstances
- MouseAvailable
- MoveAfterReturn
- MoveAfterReturnDirection
- MultiThreadedCalculation
- Name
- Names
- NetworkTemplatesPath
- NewWorkbook
- ODBCErrors
- ODBCTimeout
- OLEDBErrors
- OnWindow
- OperatingSystem
- OrganizationName
- Parent
- Path
- PathSeparator
- PivotTableSelection
- PreviousSelections
- PrintCommunication
- ProductCode
- PromptForSummaryInfo
- ProtectedViewWindows
- QuickAnalysis
- Range
- Ready
- RecentFiles
- RecordRelative
- ReferenceStyle
- RegisteredFunctions
- ReplaceFormat
- RollZoom
- Rows
- RTD
- ScreenUpdating
- Selection
- SensitivityLabelPolicy
- Sheets
- SheetsInNewWorkbook
- ShowChartTipNames
- ShowChartTipValues
- ShowDevTools
- ShowMenuFloaties
- ShowQuickAnalysis
- ShowSelectionFloaties
- ShowStartupDialog
- ShowToolTips
- SmartArtColors
- SmartArtLayouts
- SmartArtQuickStyles
- Speech
- SpellingOptions
- StandardFont
- StandardFontSize
- StartupPath
- StatusBar
- TemplatesPath
- ThisCell
- ThisWorkbook
- ThousandsSeparator
- Top
- TransitionMenuKey
- TransitionMenuKeyAction
- TransitionNavigKeys
- UsableHeight
- UsableWidth
- UseClusterConnector
- UsedObjects
- UserControl
- UserLibraryPath
- UserName
- UseSystemSeparators
- Value
- VBE
- Version
- Visible
- WarnOnFunctionNameConflict
- Watches
- Width
- Windows
- WindowsForPens
- WindowState
- Workbooks
- WorksheetFunction
- Worksheets
Confira também
Suporte e comentários
Tem dúvidas ou quer enviar comentários sobre o VBA para Office ou sobre esta documentação? Confira Suporte e comentários sobre o VBA para Office a fim de obter orientação sobre as maneiras pelas quais você pode receber suporte e fornecer comentários.