Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ActiveWindow Property [Visio 2003 SDK Documentation]

Office 2003

Returns the active Window object.

objRet = object.ActiveWindow

objRet     A Window object that represents the active window.

object     Required. An expression that returns the Application object that owns the window.

Version added



The active window can be one of the following window types: Drawing, Stencil, ShapeSheet, Edit Icon, or a Drawing or Stencil window created by an add-on. The application's active window can only be an MDI frame window—it cannot be one of the floating, docked, or anchored windows. For a complete list of window types, see the Type property.

If a window in an instance of Microsoft Office Visio is not active, the ActiveWindow property returns Nothing.


The following Microsoft Visual Basic for Applications (VBA) macro shows how to get the active window without qualification from the Microsoft Office Visio global object, which is automatically available to VBA code that is part of the VBA project of a Visio document.

Public Sub ActiveWindow_Example()
    Dim vsoWindow As Visio.Window 

    'Get the active window.
    Set vsoWindow = ActiveWindow 

    'To verify that we got the active window, print its caption. 
    Debug.Print vsoWindow.Caption 

End Sub

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.