How to: Close Workbooks
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

How to: Close Workbooks


Some code examples in this topic use the this or Me keyword or the Globals class in a way that is specific to document-level customizations, or they rely on features of document-level customizations such as host controls. These examples can be compiled only if you have the required applications installed. For more information, see Features Available by Product Combination.

This example demonstrates the Close method, which you can use to close the specified Workbook, optionally specifying whether changes should be saved. If the Workbook has never been saved, you can specify a file name. In addition, if the Workbook is to be routed to other users, you can specify whether you want to send the Workbook on to the next user.


Globals.ThisWorkbook.Close(false, missing, missing);

See Also

© 2015 Microsoft