Close method (VBA Add-In Object Model)

Closes and destroys a window.

Syntax

object.Close

The object placeholder is an object expression that evaluates to an object in the Applies To list.

Remarks

The following types of windows respond to the Close method in different ways:

  • For a window that is a code pane, Close destroys the code pane.

  • For a window that is a designer, Close destroys the contained designer.

  • For windows that are always available on the View menu, Close hides the window.

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.