I just figured something out.

I have this code to determine the last row in a file.

Set wrksht = Workbooks("Book2.xlsm").Worksheets("Sheet1")
lastrow = wrksht.Cells(500000, 1).End(xlUp).Row
it works fine when the file is an excel 2007 file. But when the file is an excel 97 file it returns a value of "0".

Any ideas?