Date sous 3 textbox (VBA) [Résolu/Fermé]
A voir également:
- Date sous 3 textbox (VBA)
- Date sous 3 textbox (VBA) ✓ - Forum - VB / VBA
- Format date textbox vba - Forum - VB / VBA
- Ecrire une date dans une textbox au format 12/12/2005 en vba ✓ - Forum - VB / VBA
- TextBox au format date ✓ - Forum - VB / VBA
- Format de saisie dans textbox userform excel ✓ - Forum - Excel
2 réponses
f894009
- Messages postés
- 15527
- Date d'inscription
- dimanche 25 novembre 2007
- Statut
- Membre
- Dernière intervention
- 24 janvier 2021
Bonjour,
exemple de code sans test des entrees
Definir MaxLengh des textbox's dans les proprietes ou par programme et
ajouter les tests des caracteres numeriques.
Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If Len(TextBox1.Text) = TextBox1.MaxLength Then
TextBox2.SetFocus
End If
End Sub
Private Sub TextBox2_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If Len(TextBox2.Text) = TextBox2.MaxLength Then
TextBox3.SetFocus
End If
End Sub
Private Sub TextBox3_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If Len(TextBox3.Text) = TextBox3.MaxLength Then
MsgBox ("ok")
End If
End Sub
Bonne suite
exemple de code sans test des entrees
Definir MaxLengh des textbox's dans les proprietes ou par programme et
ajouter les tests des caracteres numeriques.
Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If Len(TextBox1.Text) = TextBox1.MaxLength Then
TextBox2.SetFocus
End If
End Sub
Private Sub TextBox2_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If Len(TextBox2.Text) = TextBox2.MaxLength Then
TextBox3.SetFocus
End If
End Sub
Private Sub TextBox3_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If Len(TextBox3.Text) = TextBox3.MaxLength Then
MsgBox ("ok")
End If
End Sub
Bonne suite