Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cursor auto move from one cell to another


Using VBA how can I have my cursor automatically move from cell C9 t
cell A14 after hitting the enter key in cell B9? (note, there may b
data entered or else it may be left blank)

Then after enter data in A14, cursor movement go back to normal fro
A14 (either right or down depending on the user settings).

Thanks all,

mikebur

--
mikebur
-----------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...fo&userid=2458
View this thread: http://www.excelforum.com/showthread.php?threadid=39956

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Cursor auto move from one cell to another

So just to clarify when the the user leaves Cell B9 you want the cursor to go
to cell A14. Assuming that to be the case add this code to the
Selection_Change event for the sheet (Right click on the tab that you want to
have this behavior - Select View Code. Just above the code window is a drop
down box with the word (General) in it. Change it to worksheet. When you do
this a procedure will be added to the Code window. This is the selection
change procedure which will fire whenever the cursor is moved.)

Private Sub Selection_Change(Target as Range)
on error goto ErrorHandler
application.enableevents = false
if target.address = "$B$9" then range("A14").select
ErrorHandler:
application.enableevents = true
end sub


--
HTH...

Jim Thomlinson


"mikeburg" wrote:


Using VBA how can I have my cursor automatically move from cell C9 to
cell A14 after hitting the enter key in cell B9? (note, there may be
data entered or else it may be left blank)

Then after enter data in A14, cursor movement go back to normal from
A14 (either right or down depending on the user settings).

Thanks all,

mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=399569


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cursor auto move from one cell to another


Thanks for your help. There are two problems with the code.
(1) After entering data in cell A14, cursor changes to column B and
(2) I Can't use the arrow key to go back to the data in B8 & before.

Please help, Mikebur

--
mikebur
-----------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...fo&userid=2458
View this thread: http://www.excelforum.com/showthread.php?threadid=39956

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
Automatically move cursor when cell value changes Gary''''s Student New Users to Excel 0 January 19th 07 08:20 PM
Automatically move cursor when cell value changes scotty New Users to Excel 0 January 19th 07 08:15 PM
HOW CAN I GET MY CURSOR TO MOVE TO NEXT CELL BY PRESSING TAB Melissa Jordan Excel Discussion (Misc queries) 3 November 27th 06 11:55 PM
How do I get tab to move the cursor one cell over rather than 8? Mysti4God Excel Worksheet Functions 2 August 11th 06 07:04 PM
auto move cursor after entering number in excel Mike C Excel Worksheet Functions 3 January 2nd 06 03:27 AM


All times are GMT +1. The time now is 12:30 AM.

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"