Close Method

Applies To

Window object.

Description

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

Add method, Remove method.

Example

The following example uses the Close method to close a specified member of the Windows collection.

Application.VBE.Windows(9).Close