Share via


_Application.OnWindow Property

Returns or sets the name of the procedure that’s run whenever you activate a window.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Property OnWindow As String
    Get
    Set
'Usage
Dim instance As _Application
Dim value As String

value = instance.OnWindow

instance.OnWindow = value
string OnWindow { get; set; }

Property Value

Type: System.String

Remarks

The procedure specified by this property isn’t run when other procedures switch to the window or when a command to switch to a window is received through a DDE channel. Instead, the procedure responds to the user's actions, such as clicking a window with the mouse, clicking Go To on the Edit menu, and so on.

If a worksheet or macro sheet has an Auto_Activate or Auto_Deactivate macro defined for it, those macros will be run after the procedure specified by the OnWindow property.

See Also

Reference

_Application Interface

_Application Members

Microsoft.Office.Interop.Excel Namespace