Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default Code event for the "enter Key"

Hello from Steved

Question how can I have the enter key shift down to the next below cell and
then the home key please.

an example would be The enter key is in Cell K7 now I want the enter key to
go Cell K8 and then to Cell A8

another example would be The enter key is in Cell K8 now I want the enter
key to go Cell K9 and then to Cell A9 ( in other words down 1 cell then use
the home key ).

Thankyou.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Code event for the "enter Key"

Put this in a standard module:

Public down As Boolean


Put this in workshet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("K:K")) Is Nothing Then
Exit Sub
End If
If down Then
Target.Offset(1, 0).Select
Else
n = Target.Row
Range("A" & n).Select
End If
down = Not down
End Sub

--
Gary''s Student - gsnu200726


"Steved" wrote:

Hello from Steved

Question how can I have the enter key shift down to the next below cell and
then the home key please.

an example would be The enter key is in Cell K7 now I want the enter key to
go Cell K8 and then to Cell A8

another example would be The enter key is in Cell K8 now I want the enter
key to go Cell K9 and then to Cell A9 ( in other words down 1 cell then use
the home key ).

Thankyou.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default Code event for the "enter Key"

Hello Gary from Steved

Yes and I thankyou, Could you please make a modification so when it goes
back to Column A which I require it drops down a cell as for example Cell A8
to Cell A9

Thankyou for taking timeout on my issue.



"Gary''s Student" wrote:

Put this in a standard module:

Public down As Boolean


Put this in workshet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("K:K")) Is Nothing Then
Exit Sub
End If
If down Then
Target.Offset(1, 0).Select
Else
n = Target.Row
Range("A" & n).Select
End If
down = Not down
End Sub

--
Gary''s Student - gsnu200726


"Steved" wrote:

Hello from Steved

Question how can I have the enter key shift down to the next below cell and
then the home key please.

an example would be The enter key is in Cell K7 now I want the enter key to
go Cell K8 and then to Cell A8

another example would be The enter key is in Cell K8 now I want the enter
key to go Cell K9 and then to Cell A9 ( in other words down 1 cell then use
the home key ).

Thankyou.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default Code event for the "enter Key"

Hello From Steved

n = Target.Row + 1

Did what I required.

Thankyou.

"Steved" wrote:

Hello Gary from Steved

Yes and I thankyou, Could you please make a modification so when it goes
back to Column A which I require it drops down a cell as for example Cell A8
to Cell A9

Thankyou for taking timeout on my issue.



"Gary''s Student" wrote:

Put this in a standard module:

Public down As Boolean


Put this in workshet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("K:K")) Is Nothing Then
Exit Sub
End If
If down Then
Target.Offset(1, 0).Select
Else
n = Target.Row
Range("A" & n).Select
End If
down = Not down
End Sub

--
Gary''s Student - gsnu200726


"Steved" wrote:

Hello from Steved

Question how can I have the enter key shift down to the next below cell and
then the home key please.

an example would be The enter key is in Cell K7 now I want the enter key to
go Cell K8 and then to Cell A8

another example would be The enter key is in Cell K8 now I want the enter
key to go Cell K9 and then to Cell A9 ( in other words down 1 cell then use
the home key ).

Thankyou.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Code event for the "enter Key"

Good Job !!
--
Gary''s Student - gsnu200726


"Steved" wrote:

Hello From Steved

n = Target.Row + 1

Did what I required.

Thankyou.

"Steved" wrote:

Hello Gary from Steved

Yes and I thankyou, Could you please make a modification so when it goes
back to Column A which I require it drops down a cell as for example Cell A8
to Cell A9

Thankyou for taking timeout on my issue.



"Gary''s Student" wrote:

Put this in a standard module:

Public down As Boolean


Put this in workshet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("K:K")) Is Nothing Then
Exit Sub
End If
If down Then
Target.Offset(1, 0).Select
Else
n = Target.Row
Range("A" & n).Select
End If
down = Not down
End Sub

--
Gary''s Student - gsnu200726


"Steved" wrote:

Hello from Steved

Question how can I have the enter key shift down to the next below cell and
then the home key please.

an example would be The enter key is in Cell K7 now I want the enter key to
go Cell K8 and then to Cell A8

another example would be The enter key is in Cell K8 now I want the enter
key to go Cell K9 and then to Cell A9 ( in other words down 1 cell then use
the home key ).

Thankyou.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default Code event for the "enter Key"

Thankyou.

"Gary''s Student" wrote:

Good Job !!
--
Gary''s Student - gsnu200726


"Steved" wrote:

Hello From Steved

n = Target.Row + 1

Did what I required.

Thankyou.

"Steved" wrote:

Hello Gary from Steved

Yes and I thankyou, Could you please make a modification so when it goes
back to Column A which I require it drops down a cell as for example Cell A8
to Cell A9

Thankyou for taking timeout on my issue.



"Gary''s Student" wrote:

Put this in a standard module:

Public down As Boolean


Put this in workshet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("K:K")) Is Nothing Then
Exit Sub
End If
If down Then
Target.Offset(1, 0).Select
Else
n = Target.Row
Range("A" & n).Select
End If
down = Not down
End Sub

--
Gary''s Student - gsnu200726


"Steved" wrote:

Hello from Steved

Question how can I have the enter key shift down to the next below cell and
then the home key please.

an example would be The enter key is in Cell K7 now I want the enter key to
go Cell K8 and then to Cell A8

another example would be The enter key is in Cell K8 now I want the enter
key to go Cell K9 and then to Cell A9 ( in other words down 1 cell then use
the home key ).

Thankyou.



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
Help!!! Enter "7" in a cell and Excel changes the "7" to "11" immediately!!! [email protected] Excel Discussion (Misc queries) 3 January 5th 07 02:18 PM
command button and the "enter" and "tab" keys dr chuck Excel Programming 10 September 11th 06 12:09 AM
Can I enter a "Y" and return "Yes" in the same cell? PART 2 rbbbbeee Excel Programming 2 August 16th 06 12:20 PM
Make "Edit" mode default, rather than "Enter"? Greg Boettcher Excel Discussion (Misc queries) 1 July 27th 06 01:46 AM
"enter" event of activex combobox? crapit Excel Programming 11 July 13th 04 11:59 AM


All times are GMT +1. The time now is 02:22 PM.

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"