Previous Topic: MethodsNext Topic: Windows Object


Close

Closes windows.

Syntax

object.Close ( [SaveChanges] )

Parameters

object

An expression that evaluates to a Window object.

SaveChanges

(Optional) An enum of type DsSaveChanges that indicates whether to save changes to a document before closing it. Following are the possible values, which have the Long type:

dsSaveChangesYes - Saves all changes and does not prompt the user (the default).

dsSaveChangesNo - Does not save changes, and does not prompt the user.

dsSaveChangesPrompt - Prompts the user to save changes. If the user chooses not to save the changes, Close returns the enum dsSaveStatus with the value dsSaveCanceled; otherwise Close returns dsSaveSucceeded.

Return Values

The Close method returns the enum dsSaveStatus, which has one of the following values:

dsSaveCanceled - Indicates that the user chose not to save changes to the document.

dsSaveSucceeded - Indicates that the user saved changes to the document.