ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Atomatically moving the cursor 2 cells to the right. (https://www.excelbanter.com/excel-programming/337839-atomatically-moving-cursor-2-cells-right.html)

Steved

Atomatically moving the cursor 2 cells to the right.
 
Hello from Steved

If I type in any cell in Col D 40043 the moment it types in the last numeral
in this case 3 the cursor goes across two tabs to the right to Col F.

In every case it types 5 numerals on the last numeral the cursor then moves
2 cells to the right.

Thankyou.

Bob Phillips[_6_]

Atomatically moving the cursor 2 cells to the right.
 
Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Column = 4 Then
With Target
.Offset(0, 2).Select
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Steved" wrote in message
...
Hello from Steved

If I type in any cell in Col D 40043 the moment it types in the last

numeral
in this case 3 the cursor goes across two tabs to the right to Col F.

In every case it types 5 numerals on the last numeral the cursor then

moves
2 cells to the right.

Thankyou.




David McRitchie

Atomatically moving the cursor 2 cells to the right.
 
I don't think the poster wanted to know how to do that, but rather
how to eliminate it. The part about limiting entry to 5 digits is the
part that confusing because you can't do that in Excel or Excel VBA
alone. Perhaps with API or some keylogger coding.

otherwise, would have simply suggested looking to see if there
was a event macro for the sheet by rightclick on worksheet tab,
view code. Next would be to check ThisWorkbook by right click
on the button (excel logo) to left of menu bar, and view code.
And if that wasn't the cause to turn off macros and
see if the problems persists.

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Bob Phillips" wrote in message ...
Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Column = 4 Then
With Target
.Offset(0, 2).Select
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Steved" wrote in message
...
Hello from Steved

If I type in any cell in Col D 40043 the moment it types in the last

numeral
in this case 3 the cursor goes across two tabs to the right to Col F.

In every case it types 5 numerals on the last numeral the cursor then

moves
2 cells to the right.

Thankyou.






Bob Phillips[_6_]

Atomatically moving the cursor 2 cells to the right.
 
Hi David,

I wasn't sure from the post, so I took a pot ;-)

Bob


"David McRitchie" wrote in message
...
I don't think the poster wanted to know how to do that, but rather
how to eliminate it. The part about limiting entry to 5 digits is the
part that confusing because you can't do that in Excel or Excel VBA
alone. Perhaps with API or some keylogger coding.

otherwise, would have simply suggested looking to see if there
was a event macro for the sheet by rightclick on worksheet tab,
view code. Next would be to check ThisWorkbook by right click
on the button (excel logo) to left of menu bar, and view code.
And if that wasn't the cause to turn off macros and
see if the problems persists.

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Bob Phillips" wrote in message

...
Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Column = 4 Then
With Target
.Offset(0, 2).Select
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Steved" wrote in message
...
Hello from Steved

If I type in any cell in Col D 40043 the moment it types in the last

numeral
in this case 3 the cursor goes across two tabs to the right to Col F.

In every case it types 5 numerals on the last numeral the cursor then

moves
2 cells to the right.

Thankyou.








Steved

Atomatically moving the cursor 2 cells to the right.
 
Hello Bob from Steved

Just what I required

Thankyou.

"Bob Phillips" wrote:

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Column = 4 Then
With Target
.Offset(0, 2).Select
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Steved" wrote in message
...
Hello from Steved

If I type in any cell in Col D 40043 the moment it types in the last

numeral
in this case 3 the cursor goes across two tabs to the right to Col F.

In every case it types 5 numerals on the last numeral the cursor then

moves
2 cells to the right.

Thankyou.






All times are GMT +1. The time now is 09:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com