Skip to content

Latest commit

 

History

History
42 lines (24 loc) · 903 Bytes

Excel.Workbooks.Close.md

File metadata and controls

42 lines (24 loc) · 903 Bytes
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Workbooks.Close method (Excel)
vbaxl10.chm203074
vbaxl10.chm203074
Excel.Workbooks.Close
d798166c-6b27-16a1-0b64-8f547978e371
05/18/2019
medium

Workbooks.Close method (Excel)

Closes the object.

Syntax

expression.Close

expression A variable that represents a Workbooks object.

Remarks

Closing a workbook from Visual Basic doesn't run any Auto_Close macros in the workbook. Use the RunAutoMacros method to run the auto close macros.

Example

This example closes all open workbooks. If there are changes in any open workbook, Microsoft Excel displays the appropriate prompts and dialog boxes for saving changes.

Workbooks.Close

[!includeSupport and feedback]