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
- Confirmer le nouvel envoi du formulaire err_cache_miss - Forum Google Chrome
- Confirmation de l'envoi d'un formulaire html ✓ - Forum HTML
- Problème d'envoi de formulaire ✓ - Forum PHP
- Vba textbox date format dd/mm/yyyy - Forum VB / VBA
1 réponse
pijaku
Messages postés
12263
Date d'inscription
jeudi 15 mai 2008
Statut
Modérateur
Dernière intervention
4 janvier 2024
2 744
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