Originally Posted by
fredlo2010
Can you post a sample of the code you are using. I have never used xlCellTypeLastCell.
Here's an example:
The active cell is then the empty cell C10, not A1.
Originally Posted by
fredlo2010
I have never used xlCellTypeLastCell. Why dont you use a row.count reference?
Rows.Count requires a selection of the desired range, but the point is that I am trying to determine the range. Apparently, if used without a range it exhibits the same problem; it goes to the last row of the sheet before it was cleared, if that has a higher row number than the current data in the sheet occupy. The problem exists with any Ctrl+ Arrow Key combination (or the xl equivalents in code), not just xlCellTypeLastCell (or its alias, xlLastCell).
I am currently workong around the problem by selecting the first cell in a column that I know has contiguous data in all its rows, and using Application.WorksheetFunctions.COUNT (or COUNTA) to find the last row.
Thanks, but I'm still trying for a better solution, in case I don't have a solid column I can count on. (Pardon the pun.)
Henry
Bookmarks