PC Review


Reply
Thread Tools Rate Thread

Code event for the "enter Key"

 
 
=?Utf-8?B?U3RldmVk?=
Guest
Posts: n/a
 
      31st May 2007
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 With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      31st May 2007
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 With Quote
 
=?Utf-8?B?U3RldmVk?=
Guest
Posts: n/a
 
      31st May 2007
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 With Quote
 
=?Utf-8?B?U3RldmVk?=
Guest
Posts: n/a
 
      31st May 2007
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 With Quote
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      31st May 2007
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 With Quote
 
=?Utf-8?B?U3RldmVk?=
Guest
Posts: n/a
 
      31st May 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Field Names: "LongName", "ShortName", "Code", "Description","Comments" PeteCresswell Microsoft Access 2 25th Feb 2009 11:41 PM
Have "ENTER" run certain code instead of "next field" BlueWolverine Microsoft Access Form Coding 1 23rd Apr 2008 03:58 PM
MrxSMB event id: 3019 is logged if i enter "workgroup" kimiraikkonen Windows XP General 4 25th Sep 2007 02:16 PM
What TextBox Event to track when the user press the "enter" key Kueishiong Tu Microsoft Dot NET Framework 3 27th Sep 2003 04:35 AM
What TextBox event to track when the user press the "enter" key Kueishiong Tu Microsoft Dot NET Framework Forms 1 26th Sep 2003 02:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:59 PM.