Thread: looping to End
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default looping to End

one way:

Application.GoTo _
Sheets("Sheet1").Cells.SpecialCells(xlCellTypeLast Cell)

In article ,
"Nabeel Moeen" wrote:

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