ActiveWorkbook Property
TOC
Collapse the table of content
Expand the table of content

Application.ActiveWorkbook Property (Excel)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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

Note Note

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

expression .ActiveWorkbook

expression A variable that represents an Application object.

This example displays the name of the active workbook.

MsgBox "The name of the active workbook is " & ActiveWorkbook.Name
Show:
© 2016 Microsoft