I'm using the following code to set the cursor automatically (important) to the first empty textbox on my form:
Private Sub FirstEmptyBox()
If TextBox1.Text = "" Then
TextBox1.Select()
Exit Sub
End If
If TextBox2.Text = "" Then
TextBox2.Select()
Exit Sub
End If
If TextBox3.Text = "" Then
TextBox3.Select()
Exit Sub
End If
'(Etc. Etc. You get the picture.)
End Sub
Works great! The problem is that I have 14 zillion textboxes, and I don't want to get carpal tunnel syndrome.
Any help please?
Private Sub FirstEmptyBox()
If TextBox1.Text = "" Then
TextBox1.Select()
Exit Sub
End If
If TextBox2.Text = "" Then
TextBox2.Select()
Exit Sub
End If
If TextBox3.Text = "" Then
TextBox3.Select()
Exit Sub
End If
'(Etc. Etc. You get the picture.)
End Sub
Works great! The problem is that I have 14 zillion textboxes, and I don't want to get carpal tunnel syndrome.
Any help please?