cs_LT
Messages postés1Date d'inscriptionmardi 8 juin 2004StatutMembreDernière intervention 8 juin 2004
-
8 juin 2004 à 15:25
cs_yannickt
Messages postés64Date d'inscriptionlundi 25 août 2003StatutMembreDernière intervention22 novembre 2011
-
12 juil. 2004 à 04:42
Bonjour,
Comment faire pour :
- valider une saisie dans un textbox par la touche entrée ?
- déclencher ensuite l'exécution d'une macro.
Merci.
cs_yannickt
Messages postés64Date d'inscriptionlundi 25 août 2003StatutMembreDernière intervention22 novembre 2011 12 juil. 2004 à 04:42
Bonjour, pour faire cela, en vb6, tu double-clique sur ton contrôle textbox, tu est dans l'action "CHANGE", dans le code, tu sélectionne l'action "KEYPRESS", tu as (EX: Private Sub Text1_KeyPress(KeyAscii As Integer)), le code ascii de "enter" est 13, donc tu écrit comme code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
if keyascii = "13" then
'CE QUE TU VEUX FAIRE À LA PRESSION DE ENTER
end if
end sub