Thread: Last cell
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 153
Default Last cell

Hi Cool,
I am not quite sure if I explained myself well enough. I
am trying to change the last used cell from cell 1300 to
cell 300. If I press Crtl + End, where the last used cell
is 1300, is it possible to change what happens when I
press Ctrl + End, so that it does not end up at row 1300?

Thanks for your help.

-----Original Message-----

since xl97(SR-1?).. the last cell is reset on save.

the last cell (as microsoft sees it) is the last cell

which contains
data, comments or FORMATS(fill/numberformat or else).

you can force a recompute of lastcell:
in code: by calling the usedrange method.
but you may have to clear formats outside "your"

usedrange first.

Dim lng&
lng = wks.UsedRange.Count

Manually by DELETING all Rows and Columns beyond
what you want the usedrange to be.

HOWEVER: if row 65536 or column 256 or any cell therein
contains any formatting.. you FIRST have to reset the
formats else the newly inserted rows will get that

format and your
usedrange wont change.




keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"David" wrote:

Hi Group,
This is a second post for this question and I am

having a
hard time explaining it, but here it goes again.

Ctrl+End takes you to the last used cell in a

worksheet.
I am using version 2003. In previous versions, I could
change the last used cell by deleting rows, but only

by
doing this with code. I don't seem to be able to do

that
anymore with this version. Has something changed or

maybe
I am missing a parameter?

Thanks


.