Recherches Multiples 2

BLaSTiNG Messages postés 30 Date d'inscription jeudi 13 mai 2004 Statut Membre Dernière intervention 21 février 2006 - 24 juin 2005 à 08:44
econs Messages postés 4030 Date d'inscription mardi 13 mai 2003 Statut Membre Dernière intervention 23 décembre 2008 - 27 juin 2005 à 09:25
Bon, encore une question..

Si text1 contient:
hihihihohoho<c>hahaha</c>hihihi2hohoho<c>hahaha</c>hihihi3hohoho<c>hahaha</c>

Comment receuillir hihihi, hihihi1 et hihihi2?

Merci de votre aide,
Blasting

4 réponses

econs Messages postés 4030 Date d'inscription mardi 13 mai 2003 Statut Membre Dernière intervention 23 décembre 2008 24
24 juin 2005 à 09:04
Dim tablo() As String

Dim l As Long

Dim indiceFin As Long



tablo = Split(Text1.Text, "", , vbTextCompare)

For l = LBound(tablo) To UBound(tablo)

If tablo(l) <> "" Then

indiceFin = InStr(1, tablo(l), "", vbTextCompare)

MsgBox Left$(tablo(l), indiceFin - 1)

End If

Next l


Manu
-------------------------------------------
Une question bien posée, c'est une chance de réponse bien adaptée.
0
BLaSTiNG Messages postés 30 Date d'inscription jeudi 13 mai 2004 Statut Membre Dernière intervention 21 février 2006
25 juin 2005 à 20:15
Merci, je trouve ça très bien mais comment receuillir le résultat dans une textbox?

Merci,
Blasting
0
BLaSTiNG Messages postés 30 Date d'inscription jeudi 13 mai 2004 Statut Membre Dernière intervention 21 février 2006
27 juin 2005 à 02:11
Quelqu'un peut m'aider?

Merci,
Blasting
0
econs Messages postés 4030 Date d'inscription mardi 13 mai 2003 Statut Membre Dernière intervention 23 décembre 2008 24
27 juin 2005 à 09:25
Dim tablo() As String

Dim l As Long

Dim indiceFin As Long

Dim sTemp As String



tablo = Split(Text1.Text, "", , vbTextCompare)

sTemp = ""

For l = LBound(tablo) To UBound(tablo)

If tablo(l) <> "" Then

indiceFin = InStr(1, tablo(l), "", vbTextCompare)



sTemp = sTemp & Left$(tablo(l), indiceFin - 1) & " "

End If

Next l

Text1.Text = sTemp










Manu
-------------------------------------------
Une question bien posée, c'est une chance de réponse bien adaptée.
0
Rejoignez-nous