Workbook.ActiveSheet (Excel)

Returns a Worksheet worksheet that represents the active sheet (the sheet on top) in the active workbook or specified workbook. Returns Nothing if no sheet is active.

Using the ActiveSheet property without an object qualifier returns the active sheet in the active workbook in the active window. If a workbook appears in more than one window, the active sheet might be different in different windows.


Dim wsActiveSheet As Worksheet
Set wsActiveSheet = ActiveWorkbook.ActiveSheet