This topic has been archived. It cannot be replied.
-
枫下家园 / 电脑用户 / Is there anyone who knows how to use the Macro to get the last line number in a excel file .I use the code below. It works well under normal situation. But when the excel file only has 1 row of date or it hasn't any date, then the program stop here because the lineno will exceed the limit of integer(65535).
Worksheets("Sheet1").Select
Cells(1, 1).Select
Selection.End(xlDown).Select
lineno = ActiveCell.Row
Thanks
-oceandeep(北极熊® Zzz Zzz);
2002-9-18
{357}
(#753707@0)
-
try this!Worksheets("Sheet1").Select
rows(Cells(1, 1).CurrentRegion.Rows.Count).select
-maile(FinchEast);
2002-9-18
{81}
(#753728@0)
-
Thank you very much, It does work now
-oceandeep(北极熊® Zzz Zzz);
2002-9-18
(#753776@0)