Thread: looping to End
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jean-Yves[_2_] Jean-Yves[_2_] is offline
external usenet poster
 
Posts: 253
Default looping to End

Hi
You may use :

ActiveCell.SpecialCells(xlCellTypeLastCell).Select
or, range("A1").end(xldown).select
use this line in a Sub Workbook_Open in the "ThisWorbook" module.

Regards,

JY

"Nabeel Moeen" wrote in message
...
hello all,
when we open a worksheet and press "Ctl-End", the focus shifts to the last
populated cell in the worksheet.

How can this be accomplished programatically, i'd like to traverse all

rows
and columns till the end of the file.

Regards,
Nabeel