anyone have any help to offer? Thanks in advance. Its not just this one workbook. I've got 8 that are similar with a similar amount of controls.
Just a note, I've started doing this manually. This is what I've come up with
Private Sub txtGrace_GotFocus()
a = 8
End Sub
Private Sub txtGrace_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 9 And Shift = 1 Then
SelCell (a - 1)
chkUI.Activate
End If
If KeyCode = 9 And Shift = 0 Then
SelCell (a + 1)
cboPayType.Activate
End If
End Sub
Private Sub SelCell(num As Integer)
cRan(num).Select
a = num
End Sub
The reason for the Got focus is if the user clicks on a control, the number needs to be set to the number of that control. I'm setting a gotfocus and keydown for each control (94) of them. I'm having to look up the previous and next control name and manually type them in.
Bookmarks