W
Wescotte
I have a worksheet setup as a form where the user can enter data. I
allow the tab/right and shift+tab/left to navigate to the next and
previous cells where form data is to be filled in. However if the user
navigates to another worksheet or even workbook the changes are global.
How would I go about making the sub below specific to worksheet?
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Count > 1 Then
Exit Sub
End If
Application.OnKey "{TAB}", "MoveNext"
Application.OnKey "{RIGHT}", "MoveNext"
Application.OnKey "+{TAB}", "MovePrev"
Application.OnKey "{LEFT}", "MovePrev"
End Sub
Thanks
Eric
allow the tab/right and shift+tab/left to navigate to the next and
previous cells where form data is to be filled in. However if the user
navigates to another worksheet or even workbook the changes are global.
How would I go about making the sub below specific to worksheet?
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Count > 1 Then
Exit Sub
End If
Application.OnKey "{TAB}", "MoveNext"
Application.OnKey "{RIGHT}", "MoveNext"
Application.OnKey "+{TAB}", "MovePrev"
Application.OnKey "{LEFT}", "MovePrev"
End Sub
Thanks
Eric