Autotab textbox using loops anf if
soprano221
Messages postés
6
Statut
Membre
-
soprano221 Messages postés 6 Statut Membre -
soprano221 Messages postés 6 Statut Membre -
hello i wanted to autotab my userform in a specific bunch of textbox. i do know the code for t it beetween 2 textbox but what if we have many textbox and we dont want to start necessarily from the first one like we want to start for example from the 5th textbox. Guess we have to use loops and if but how please i need help
the code beetween two textbox goes like this under:
Private Sub TextBox1_Change()
2
'whenever there are 6 characters registered in the TextBox
3
If TextBox1.TextLength = 6 Then
4
'select (SetFocus) the next TextBox
5
TextBox2.SetFocus
6
End If
thank u all!
the code beetween two textbox goes like this under:
Private Sub TextBox1_Change()
2
'whenever there are 6 characters registered in the TextBox
3
If TextBox1.TextLength = 6 Then
4
'select (SetFocus) the next TextBox
5
TextBox2.SetFocus
6
End If
thank u all!
A voir également:
- Autotab textbox using loops anf if
- Fruity loops - Télécharger - Édition & Montage
- The realtek network controller was not found. if deep sleep mode is enabled please plug the cable ✓ - Forum Pilotes (drivers)
- Oglo loops 3 problème bluetooth - Forum Bluetooth
- Vba textbox date format dd/mm/yyyy - Forum VB / VBA
- If exist ✓ - Forum Autoit / batch
1 réponse
Bonjour,
ç'aurait été sympa que tu poses ta question en français.
Il semble que tu cherches à passer, dans un UserForm, d'un TextBox au suivant une fois qu'il y a 6 caractères dans le premier.
Je propose :
avec Verif, que tu peux appeler depuis chaque TextBoxN_Change()
A+
ç'aurait été sympa que tu poses ta question en français.
Il semble que tu cherches à passer, dans un UserForm, d'un TextBox au suivant une fois qu'il y a 6 caractères dans le premier.
Je propose :
Private Sub TextBox1_Change()
Call Verif("TextBox1", "TextBox2")
End Sub
Private Sub Verif(ori As String, dest As String)
If Controls(ori).TextLength = 6 Then Controls(dest).SetFocus
End Sub
avec Verif, que tu peux appeler depuis chaque TextBoxN_Change()
A+
soprano221
Messages postés
6
Statut
Membre
oui merci zoul c'est trés gentil . a force d'etre sur des tutoriels en anglais j'ai même oublié de m'exprimer en français . c'est trés sympa de ta part