IsAlphaNumeric

IsAlphaNumeric

Messagepar Michael DELIQUE » 29 Mars 2011 à 09:16

Code : Tout sélectionner
Function isAlphaNumeric(wSource As String) As Boolean
   
   On Error Goto CatchError
   isAlphaNumeric = False   
   If Trim(wSource) = "" Then
      Exit Function
   End If   
   
   If  (wSource Like "*[!a-z,!A-Z,!0-9]*") =  True Then
      isAlphaNumeric = False
   Else
      isAlphaNumeric = True
   End If   
   
   Exit Function   
CatchError:
   Msgbox "("+Cstr(Getthreadinfo (1))+" Call by "+Cstr(Getthreadinfo(10))+")"+Chr(10)+"Erreur " + Cstr(Err) + " : "+Chr(10) + Cstr(Error)+". "+Chr(10)+"Ligne N° "+Cstr(Erl),16," ERREUR !"
   isAlphaNumeric = False
   Exit Function
End Function
Cordialement

Michael (SMS-Phobique)
----------------------------
"La théorie, c'est quand on sait tout et que rien ne fonctionne. La pratique, c'est quand tout fonctionne et que personne ne sait pourquoi."
Albert EINSTEIN
Avatar de l’utilisateur
Michael DELIQUE
Administrateur
Administrateur
 
Message(s) : 12183
Inscrit(e) le : 16 Déc 2004 à 10:36
Localisation : Paris/Cergy

Retour vers Chaines de caractères