Activate Method [Visio 2003 SDK Documentation]
Activates a window.
object**.Activate**
object Required. An expression that returns a Window object.
Version added
2.0
Remarks
Microsoft Office Visio can have more than one window open at a time; however, only one window is active. Activating a window can change the objects returned by the ActiveWindow, ActivePage, and ActiveDocument properties.
Example
The following macro creates two windows, and then shows how to activate one of the windows.
Public Sub Activate_Example()
Dim vsoDocument As Visio.Document
Dim vsoWindow As Visio.Window
'Create two new windows by adding documents.
Set vsoDocument = Documents.Add("")
Set vsoWindow = ActiveWindow
Set vsoDocument = Documents.Add("")
'Use the Activate method to make the first
'window created the active window.
vsoWindow.Activate
End Sub
Applies to | Window object
See Also | ActiveDocument property | ActivePage property | ActiveWindow property