for i = 1 to 6 if not isnumeric(mid$(ta_chaine, i, 1)) then goto err next exit sub err: msgbox "la chaine n'est pas composé de 6 chiffres"
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionFunction Is6Digit(LaChaine as String) as Boolean Is6digit = (LaChaine like "[0-9][0-9][0-9][0-9][0-9][0-9]") End Function
Function Is6Letters(LaChaine as String) as Boolean Is6digit = (Lcase$(LaChaine) like "[a-z][a-z][a-z][a-z][a-z][a-z]") End Function
Dim tachaine$ tachaine$ = Val(tachaineTB.Text) If tachaineTB.Text = tachaine Then 'Nombre seulement ElseIf tachaineTB.Text = tachaine Then 'Contient autre que nombre End If