Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default Move curser left one cell

When I click on the finished button on my dialog box I would like the focus
to move left by 1 cell. So if cell E4 is active I want cell D4 to become
active.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Move curser left one cell

If you dialog box is closed by you clicking a button there will be
code to close it i presume.

Therefore make the last line of the code,

sheets("sheet1").range("d4").activate

or

activecell.offset(0,-1).select
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Move curser left one cell

G'day

If you don't know where the cursor is going to be at any given time, the
generic way of achieveing this is :

Activecell.Offset(0,-1).Select

The first co-ordinate for an offset is for Row - in this case you want to
stay on the same row so you use 0. The second co-ordinate is for Column. To
go 1 column to the left you use -1. You'll have to be careful to allow for
the possibility that the active cell is in row A. Trying to go left from
there will give you a run time error.


--
Time is just the thing that keeps everything from happening all at once


"anon" wrote:

If you dialog box is closed by you clicking a button there will be
code to close it i presume.

Therefore make the last line of the code,

sheets("sheet1").range("d4").activate

or

activecell.offset(0,-1).select

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
How do you move the curser around in a cell krisf New Users to Excel 1 September 21st 09 10:06 PM
My curser does not move the window at the bottom guyogden Excel Discussion (Misc queries) 1 October 4th 07 12:30 PM
VISUAL BASIC COMMAND TO MOVE CURSER DOWN ONE CELL Moving Problem! Excel Worksheet Functions 2 December 19th 06 08:00 AM
Move curser to specific cell when closing Richard Excel Worksheet Functions 1 October 29th 06 12:49 PM
Wherever I try and move my curser to it highlights that group of c Biggie J Excel Discussion (Misc queries) 2 May 30th 05 07:26 PM


All times are GMT +1. The time now is 03:53 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"