Hi all,
I tried to use .setfocus with my textbox_keydown but it doesn't work. Any idea why ?
Private Sub txtJurCode_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = vbKeyReturn Or KeyCode = vbKeyTab Then
If txtJurCode.Text = "" Then
MsgBox "You must enter a JUR Code.", vbCritical + vbSystemModal
txtJurCode.SetFocus
Exit Sub
End If
end sub
I tried to use .setfocus with my textbox_keydown but it doesn't work. Any idea why ?
Private Sub txtJurCode_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = vbKeyReturn Or KeyCode = vbKeyTab Then
If txtJurCode.Text = "" Then
MsgBox "You must enter a JUR Code.", vbCritical + vbSystemModal
txtJurCode.SetFocus
Exit Sub
End If
end sub