Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default looping to End

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looping Maggie[_6_] Excel Discussion (Misc queries) 6 October 2nd 08 09:14 PM
Looping [email protected] Excel Programming 0 October 31st 03 07:47 PM
Looping Stuart[_9_] Excel Programming 0 October 29th 03 11:31 PM
Looping J.E. McGimpsey Excel Programming 0 October 29th 03 11:09 PM
Need Looping Help [email protected] Excel Programming 2 October 29th 03 08:11 PM


All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"