I think Bob gave you the answer, but you could use "A", too:
And I think I'd do:
Dim LastRow As Long
Just in case it's a big number (32k).
Dim LastRow As Long
with activesheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
end with
and one mo
workbooks(activeworkbook.name)
is equivalent to
activeworkbook
"ajliaks <" wrote:
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