Application.ActiveWorkbook (Excel)

Returns a Workbook object that represents the workbook in the active window (the window on top). Returns Nothing if there are no windows open or if either the Info window or the Clipboard window is the active window.


Dim wbActiveWorkbook As Workbook
Set wbActiveWorkbook = ActiveWorkbook