Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default How can I specify which cell has focus?

Range("D2000").Select

or

Application.Goto Range("D2000"), True
will scroll D2000 to the upper left of the window (the True part)

Application.GoTo handles book/sheet activation automatically, where as the
selection does not. When using Select, you must first select the workbook
(if it's not active), then the worksheet, then the range, e.g.

Workbooks("Book2").Activate
Worksheets("Sheet1").Select
Range("D2000").Select

whereas GoTo can do it in one line of code:
Application.Goto Workbooks("Book2").Worksheets("Sheet1").Range("D20 00"),
True


--
Tim Zych
www.higherdata.com
Compare data in worksheets and find differences with Workbook Compare
A free, powerful, flexible Excel utility


"Christian Blackburn" wrote in message
...
Hi Gang,

I would like to programmatically advance to a specific cell. Can
someone reply with an example?

Thanks,
Christian Blackburn



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
Disable cell focus [email protected] Excel Discussion (Misc queries) 1 April 26th 09 12:04 AM
Set Focus on Cell D8 Sandy Excel Programming 4 September 11th 05 10:03 PM
Set focus to cell? No Name Excel Programming 1 December 29th 04 01:10 AM
Cell Lost Focus Craig[_5_] Excel Programming 1 July 23rd 03 05:18 AM
Highlight Cell on Focus Nigel Graham Excel Programming 4 July 23rd 03 03:39 AM


All times are GMT +1. The time now is 07:21 AM.

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

About Us

"It's about Microsoft Excel"