'Fonction qui donne la position(integer)
'd'un texte dans une variable
' EX : text1 ="vivevbfrance vbfrance.com"
' Position(text1,"vbfance") renvoie 5
' Position(text1,"vbfance",6) renvoie 14
Public Function Position(variable As String, Texte As String, Optional ApartirDe As Integer = 1)
Dim i As Integer
Dim debut As Integer
For i = ApartirDe To Len(variable)
If Mid(variable, i, Len(Texte)) = Texte Then Exit For
Next i
Position = i
End Function
c'est pas vraiment ta question mais tu peu comprendre comment lire caractére par caractére!!
Ex:
Dim Variable as string
Dim Caractere as string
Variable="Mon texte blablabla..."
'Boucle for next du debut a la fin de la variable
For i=1 to len(variable)
'Lecture du caractére
Caractere= mid(variable,i,1)
next i ' retour de boucle
Voila a chaque passage dans la boucle le caractére est stocké dans la variable, a toi ensuite de modifier le code pour arriver à tes fin...