Window.Active property (Word)

True if the specified window is active. Read-only Boolean.

Syntax

expression.Active

expression Required. A variable that represents a Window object.

Example

This example activates the first window in the Windows collection, if the window isn't currently active.

Sub ActiveWin() 
 If Windows(1).Active = False Then Windows(1).Activate 
End Sub

See also

Window Object

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.