Many things to see to understand. This forum is rich in your contributions and it is difficult for me to understand everything (and English does not help)
Yes, it's true that copying and pasting does not help you to learn well. That's why I'm doing my experiments trying to help you with the documentation and your remarks.
A bit of code that I had fun doing with basic syntax. It is certainly not fast or optimized but as I often say I try to be pragmatic.
Regards
Code: Select all
'Split version 02
Dim As String s = "aaaa;bbbbbb;ccccc;ddddddd;eeeeee" 'chaine à découper
Dim As String t=s 'chaine de travail
Dim As String d = ";" 'délimiteur
Dim As Integer nb=0 ' nombre d'éléments
Dim As Integer p,i
' Recherche du nombre d éléments pour dimenstionner le tableau
For i=1 To Len(s)
If Mid(s,i,1)=d Then nb=nb+1
Next
' dimensionnement du tableau
nb=nb+1 ' rajout de 1 pour dernier élément
Dim As String tableau(1 to nb)
' remplissage tableau
For i=1 To nb
p=instr(t,d)
tableau(i)= mid(t,1,p-1)
t=right(t,Len(t)-p)
Next
' Vérification
For i=1 To nb
Print i,Tableau(i),Len(Tableau(i))
Next