Close [AutoExcelWin, AutoWindow]

 

The Close method closes a window, optionally asking to save changes first. Returns a Boolean with the AutoWindow object.

 

Syntax

object.Close( SaveChanges, FileName )

 

Parameter

Type

Description

SaveChanges

GrfSaveTypes

optional, default=grfSaveChangesYes

FileName

String

optional, default="", path, file name, and file extension. If this is not specified the FullName property is used.

 

Remarks

With the AutoWindow object:

·       grfSaveChangesYes prompts you to save changes if this is the last open view on the document and the document has been changed.

·      Returns true if the window was closed.

·      The window may not be closed if grfSaveChangesYes operation was canceled.

 

Example

This example demonstrates how to automatically save the contents of a window as " test.grf."

Window. Close (grfSaveChangesYes, GrapherApp.Path+"\ Samples\test.grf")

 

Used by: AutoExcelWin object, AutoWindow object