That would give the number of rows in the used range--not always the last used
row.
If your data were in A99:A100, you'd get 2.
Maybe
Dim lngLastRow As Long
with activesheet
lngLastRow = .UsedRange.rows(.usedrange.rows.count).row
end with
just in case??
Bill Renaud wrote:
Dim lngLastRow As Long
lngLastRow = ActiveSheet.UsedRange.Rows.Count
--
Regards,
Bill
"ajliaks " wrote in message
...
Plz,
I am trying to use this, but getting error!
I need to get the last active row in the active sheet
Dim LastRow As Integer
LastRow =
Workbooks(ActiveWorkbook.Name).Worksheets(ActiveSh eet).Cells(Rows.Count,
"1").End(xlUp).Row
May be its because of the "1" ???
Thanks.
---
Message posted from http://www.ExcelForum.com/
--
Dave Peterson