Thread: Last cell
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Green[_4_] John Green[_4_] is offline
external usenet poster
 
Posts: 47
Default Last cell

Hi David,

This is standard Excel behaviour. To reset the LastCell you can either save
the workbook or execute the following:

ActiveSheet.UsedRange

Naturally, if controlling Excel from VB you would need to qualify the above
with a reference to the Excel Application. Something like:

xlApp.ActiveSheet.UsedRange

--
John Green
Sydney
Australia


"David" wrote in message
...
Hi Group,
I am using - ActiveCell.SpecialCells(xlLastCell).Select - to find the lst
cell. Then I am using - Rows((TopRow) & ":" & (BottomRow)).Delete - to

delete
a range of rows. What I expected was that the "xlLastCell" would change,

but
it did not.

I am essentailly trying to "raise" the location of the "LastCell" to a row
higher than it currectly occupies. In fact I thought this was the only way

to
do it? I am using VB 6.3 in Office Professional in Excel 2003. Has

something
changed?
--
David