Evenement Key_press textbox / formulaire
Résolu/Fermé
ph412
Messages postés
45
Date d'inscription
mercredi 10 décembre 2014
Statut
Membre
Dernière intervention
11 décembre 2017
-
Modifié par ph412 le 31/01/2016 à 20:25
Ph412 - 1 févr. 2016 à 17:24
Ph412 - 1 févr. 2016 à 17:24
A voir également:
- Evenement Key_press textbox / formulaire
- Formulaire de réclamation facebook - Guide
- Alias du formulaire - Forum Programmation
- Récupérer compte hotmail sans formulaire ✓ - Forum Hotmail (Outlook.com)
- Formulaire de remboursement free pdf ✓ - Forum Vos droits sur internet
- Formulaire de contact le bon coin ✓ - Forum Internet / Réseaux sociaux
1 réponse
pijaku
Messages postés
12263
Date d'inscription
jeudi 15 mai 2008
Statut
Modérateur
Dernière intervention
15 mars 2023
2 712
1 févr. 2016 à 13:17
1 févr. 2016 à 13:17
Bonjour,
Comme ceci :
Pour sortir du textbox, appuyez sur Tabulation ou fermez l'userform
Comme ceci :
Pour sortir du textbox, appuyez sur Tabulation ou fermez l'userform
Option Explicit Private NeSortPas As Boolean Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) TextBox1 = "" Cancel = NeSortPas End Sub Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 13 Or KeyCode = 10 Then NeSortPas = True ListBox1.AddItem TextBox1 ElseIf KeyCode = 9 Then NeSortPas = False End If End Sub
1 févr. 2016 à 17:24