I think it is, that should be an integer.
Also, if accessing the active workbook, VBA maintains a pointer to that, so
you don't need to go through the workbooks collection. And similarly with
the active sheet, which also can only be in the active workbook
Try
LastRow = ActiveSheet.Cells(Rows.Count,1).End(xlUp).Row
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"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/