Worksheet.UsedRange (Excel)

Returns a Range object that represents the used range on the specified worksheet.


Dim rngUsedRange As Range
Set rngUsedRange = ActiveSheet.UsedRange