Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automatically move cursor when cell value changes | New Users to Excel | |||
Automatically move cursor when cell value changes | New Users to Excel | |||
HOW CAN I GET MY CURSOR TO MOVE TO NEXT CELL BY PRESSING TAB | Excel Discussion (Misc queries) | |||
How do I get tab to move the cursor one cell over rather than 8? | Excel Worksheet Functions | |||
auto move cursor after entering number in excel | Excel Worksheet Functions |