Dim tabEntry() As String 'split de ton entrée Dim tabCat() As String 'tableau final aved 1 case = 1 type Dim Idx As Integer Dim Offset As Integer tabEntry = Split(rtxtbox1.Text, vbNewLine) 'rajout de cette ligne Offset = 0 For Idx = 0 To UBound(tabEntry) 'parcour du split et 'correction de la grosse connerie que j'avais mis :)If InStr(1, tabEntry(Idx), "£1") 0 And InStr(1, tabEntry(Idx), "£2") 0 Then 'si c'est un énoncé non-typé tabCat(Offset) = tabCat(Offset) & tabEntry(Idx) 'ajout de l'énoncé courant avec le précédent Else 'sinon Redim Preserve tabCat(Offset + 1) 'on augmente le tableau de 1 tabCat(Offset) = tabEntry(Idx) 'on y met le nouvel énoncé Offset = Offset + 1 'on sauvegarde le nouveau dernier index de notre tableau End If Next Idx 'on boucle
print #1, tsplit(j)
print #1, tsplit(j) & "£"
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question£1 je suis 1 homme
£1 je suis 1 homme
£2 je suis 1 homme
£2 je suis 1 homme
Dim tabEntry() As String 'split de ton entrée Dim tabCat() As String 'tes catégories Dim Idx As Integer Dim Offset As Integer Offset = 0 For Idx = 0 To UBound(tabEntry) - 1If InStr(1, tabEntry(Idx), "£1") 0 And InStr(1, tabEntry(Idx), "£2") 0 Then tabCat(Offset) = tabCat(Offset) & tabEntry(Idx) Else Redim Preserve tabCat(Offset + 1) tabCat(Offset) = tabEntry(Idx) Offset = Offset + 1 End If Next Idx
if (instr(1,tabE(i),"£ & inputbox.text") etc
if (instr(1,tabE(), "£*")
£1 Blabla Bloblo £2 Blabla £1 Blibli
£1 Blabla Bloblo £1 Blibli
£2 Blabla
£1 Blabla Bloblo £2Blabla £1 Blibli