Thread: Hard Return
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_1138_] Simon Lloyd[_1138_] is offline
external usenet poster
 
Posts: 1
Default Hard Return


Michael Koerner;345900 Wrote:
Currently have Excel set, so that whenever I press Enter I go to the
next cell to the right. Is there a way to set it up so that when you
reach the end of a data range i.e column G for example, that when you
hit enter you return to Column A in the next Row. Like a Hard Return.

--

Regards
Michael KoernerMicheal, assuming you have already set the cursor to move right on enter

in TOOLSOPTIONSEDIT, then right click your worksheet tab and choose
VIEW CODE and paste this in:

Code:
--------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column < 8 Then Exit Sub
If Target.Column = 8 Then
Target.Offset(1, -7).Select
End If
End Sub
--------------------


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=96775