Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 1.14 KB

Excel.Application.ActiveWorkbook.md

File metadata and controls

40 lines (24 loc) · 1.14 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Application.ActiveWorkbook property (Excel)
vbaxl10.chm183081
vbaxl10.chm183081
Excel.Application.ActiveWorkbook
637a2a30-f80c-08cd-e5c2-84716d0fff01
04/04/2019
medium

Application.ActiveWorkbook property (Excel)

Returns a Workbook object that represents the workbook in the active window (the window on top). Returns Nothing if there are no windows open or if either the Info window or the Clipboard window is the active window. Read-only.

Note

The document in the active Protected View window cannot be accessed by using this property. Instead, use the Workbook property of the ProtectedViewWindow object.

Syntax

expression.ActiveWorkbook

expression A variable that represents an Application object.

Example

This example displays the name of the active workbook.

MsgBox "The name of the active workbook is " & ActiveWorkbook.Name

[!includeSupport and feedback]