View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JT[_2_] JT[_2_] is offline
external usenet poster
 
Posts: 96
Default moving cursor to a text box

I'm using the code below to check for the length of data a
user has entered in a text box.

Private Sub In_ExpBr_Exit(ByVal cancel As
MSForms.ReturnBoolean)

If Len(In_ExpBr) < 2 Then
MsgBox "Please enter a valid branch number."
End If

End Sub

The user enters data into 5 text boxes. This code is
attached to the 3rd text box. After they click okay, the
message box goes away and the cursor is in the 4th text
box.

What can I add so that the cursor goes back to the 3rd
text box where they fix the branch number to be 2
characters.

Thanks for the help.........