Application.ActiveWindow (Excel)

Returns a Window object that represents the active Excel window (the window on top). Returns Nothing if there are no windows open.


Dim wndActiveWindow As Window
Set wndActiveWindow = ActiveWindow