What result do you get if you use one of the following to
determine the last row?
'--
iRow = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell) .Row
With ActiveSheet.UsedRange
iRow = .Rows(.Rows.Count).Row
End With
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)
"ilia"
wrote in message
I was just running a small macro that processes a datasheet. This is
the code, in the worksheet's module:
-snip-
For iRow = iSourceFirstRow To Me.UsedRange.Rows.Count
I noticed later that I'm missing some of the data, so I did some
debugging - and turned out that UsedRange.Rows.Count was returning one
row less than there actually were in the data sheet!
-snip-