View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default .Cells.SpecialCells(xlLastCell)

Usedrange also suffers that problem Jim.

To be safe, it is best to reset as described in
http://www.contextures.com/xlfaqApp.html#Unused

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jim Thomlinson" wrote in message
...
Last cell is not updated until you save. Deleting the rows and columns

will
fix the problem, but not until you save the spreadsheet. That is the

problem
with using last cell. For that reason you are better off using either
.usedrange or .end

HTH

"Simon Shaw" wrote:

using the code ActiveSheet.Cells.SpecialCells(xlLastCell) normally works
fine. But, sometimes after working on a sheet for a while, the code

returns
the address to cell IV65536 - the last cell in the sheet. I have tried

Clear
= All from the unused columns and rows, deleting the unused columns and
rows, but once the sheet thinks IV65536 is the last cell, it is stuck.

how
can I clear up the sheet, so it correctly calculates the last cell?