Share via


Master.Close Method

Visio Automation Reference

Closes a master.

Version Information
 Version Added:  Visio 2.0

Syntax

expression.Close

expression   A variable that represents a Master object.

Return Value
Nothing

Remarks

Use the Close method for a Master object after opening a master for editing using the Open method. The Close method pushes any changes made to the master while it was open to instances of the master.

Example

This example shows how to close all open ShapeSheet windows. It assumes at least one ShapeSheet window is open in Microsoft Office Visio.

Visual Basic for Applications
  
Public Sub Close_Example() 
    Dim intCounter As Integer 
    intCounter = Windows.Count 
'Close all ShapeSheet windows that are open.    
While intCounter <> 0 
    If Windows(intCounter).Type = visSheet Then 
        Windows(intCounter).Close 
        intCounter = Windows.Count 
    Else 
        intCounter = intCounter - 1 
    End If  
Wend

End Sub

See Also