looping to End

  • Thread starter Thread starter Nabeel Moeen
  • Start date Start date
N

Nabeel Moeen

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
 
one way:

Application.GoTo _
Sheets("Sheet1").Cells.SpecialCells(xlCellTypeLastCell)
 
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
 
Back
Top