LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Code not working to move cursor down on Enter.

Oh Wise Ones,

I just need the curser to move down when I press enter, only when inside a
set range on a set workbook/worksheet, and move to the right all other
times.

From JLGWhiz-

First I tied this:

Set MyRange = ActiveSheet.Range("J3:L12")
If Intersect(MyRange, Target) Then
Application.MoveAfterReturn = True
Application.MoveAfterReturnDirection = xlDown
Else
Application.MoveAfterReturnDirection = xlToRight
End If

Did not do anything, still moved to the right.

Then I tried this from another post:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Set Target = Intersect(Target, Range("J3:L12"))
If Not Target Is Nothing Then
Application.MoveAfterReturn = True
Application.MoveAfterReturnDirection = xlToRight
Else
Application.MoveAfterReturn = True
Application.MoveAfterReturnDirection = xlDown
End If
End Sub

Did not work either, got an error when it was placed in a module.

Any suggestions?

Thanks,
Mike
 
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
When enter key is pressed, cursor does not move to next cell in Ex Blackie Excel Discussion (Misc queries) 3 April 19th 23 02:10 PM
move cursor after inputting data without using enter key [email protected] New Users to Excel 2 June 13th 07 02:25 PM
how do I move cursor without tab, enter or arrow in Excel jlseagull Excel Discussion (Misc queries) 1 July 16th 05 03:33 AM
Cursor not to move when pressing the enter key Alex Martinez Excel Programming 2 May 12th 05 07:49 PM
Cursor not to move when hitting the enter key Alex Martinez Excel Worksheet Functions 1 May 12th 05 05:40 AM


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