Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have the following code to run using the control + enter. It works great but when I add the vba code to move the cursor to the right, it goes beyond the scroll area range I have set up (instead of going to the next row & 1st cell in the scroll area). Anyone got any ideas how to move the cursor without it leaving the scroll area? In other words, when I hit the conrol + Enter, I want the data from the cell above to copy to the active cell & move the cursor to the next cell without having to hit enter again. Thanks, mikeburg [VBA] Sub WTurnOnCtrlEnter() 'Turns on control + enter Application.OnKey "^~", "YDefaultMacro" End Sub Sub YDefaultMacro() ActiveCell.Offset(0, 0) = ActiveCell.Offset(-1, 0) End Sub Sub XTurnOffCtrlEnter() 'Turns off control + enter Application.OnKey "^~" End Sub [\VBA] -- mikeburg ------------------------------------------------------------------------ mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581 View this thread: http://www.excelforum.com/showthread...hreadid=383736 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cursor Movement | Excel Discussion (Misc queries) | |||
Cursor Movement? | Excel Worksheet Functions | |||
cursor movement | Excel Worksheet Functions | |||
Cursor movement | Excel Discussion (Misc queries) | |||
Cursor movement | Excel Worksheet Functions |