Master.Close method (Visio)
Closes a master.
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 Visio.
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
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.