Petite validation VB

Résolu
acer2000 Messages postés 17 Date d'inscription samedi 18 octobre 2003 Statut Membre Dernière intervention 10 mars 2005 - 30 janv. 2005 à 16:56
acer2000 Messages postés 17 Date d'inscription samedi 18 octobre 2003 Statut Membre Dernière intervention 10 mars 2005 - 30 janv. 2005 à 20:34
Bonjour,

Dans une form j'ai un champs text et un bouton command. Je voudrais que mon bouton command devienne Enabled que lorsque j'ai tapé 4 chiffres dans mon champs text.

Merci

2 réponses

mrdep1978 Messages postés 402 Date d'inscription jeudi 25 novembre 2004 Statut Membre Dernière intervention 7 juin 2009 7
30 janv. 2005 à 19:21
Sur l'événement Change de ta textbox, tu mets :
if len(textbox1.text) = 4 then
if isnumeric(textbox1.text) then
commandbutton1.enabled = True
else
commandbutton1.enabled = False
end if
else
commandbutton1.enabled = False
end if
3
acer2000 Messages postés 17 Date d'inscription samedi 18 octobre 2003 Statut Membre Dernière intervention 10 mars 2005
30 janv. 2005 à 20:34
merci mrdep...
ça me dépanne beaucoup!
0
Rejoignez-nous