John.McLaughlin
Board Regular
- Joined
- Jul 19, 2011
- Messages
- 169
I have a simple worksheet to enter customer Info. I want to control the order of cell selection and reduce the users need to Tab Right.
<tbody>
[TD="colspan: 3"] LAST NAME [/TD]
[TD="colspan: 3"] (E3)[/TD]
[TD="colspan: 4"][/TD]
[TD="colspan: 4"] ADDRESS [/TD]
[TD="colspan: 4"] (B6) [/TD]
[TD="colspan: 4"][/TD]
[TD="colspan: 2"] (F9)[/TD]
[TD="colspan: 4"][/TD]
[TD="colspan: 3"] CONTACT NAME [/TD]
[TD="colspan: 3"] (E12)[/TD]
</tbody>
I have also added to the top of the Worksheet module;
Nothing seems to work? Any ideas?
Thanks in advance.
- User enters First Name, press enter VBA to bounce right and enter Last Name (instead of Tab Right)
- After Last Name is entered, press enter VBA to drop down to address.
- After address is entered, VBA to drop down to City, VBA bounce right for state, VBA bounce right for zip.
- Lastly, drop down to phone number, VBA bounce right for contact name
FIRST NAME | |||
(B3) | |||
CITY | STATE | ZIP CODE | |
(B9) | (E9) | ||
PHONE NO. | |||
(B12) |
<tbody>
[TD="colspan: 3"] LAST NAME [/TD]
[TD="colspan: 3"] (E3)[/TD]
[TD="colspan: 4"][/TD]
[TD="colspan: 4"] ADDRESS [/TD]
[TD="colspan: 4"] (B6) [/TD]
[TD="colspan: 4"][/TD]
[TD="colspan: 2"] (F9)[/TD]
[TD="colspan: 4"][/TD]
[TD="colspan: 3"] CONTACT NAME [/TD]
[TD="colspan: 3"] (E12)[/TD]
</tbody>
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$B$3"
Range("E3").Activate
Case "$E$3"
Range("B6").Activate
Case "$B$6"
Range("B9").Activate
Case "$B$9"
Range("E9").Activate
Case "$E$9"
Range("F9").Activate
Case "$F$9"
Range("B12").Activate
Case "$B$12"
Range("E12").Activate
End Select
End Sub
I have also added to the top of the Worksheet module;
Code:
Private Sub Workbook_Open()
If ActiveSheet.Name = "ORDER" Then SetOnkey True
End Sub
Nothing seems to work? Any ideas?
Thanks in advance.