Split sans Split

elolydie Messages postés 5 Date d'inscription jeudi 2 septembre 2004 Statut Membre Dernière intervention 16 mai 2005 - 27 janv. 2005 à 10:40
cs_corsica Messages postés 147 Date d'inscription lundi 13 mai 2002 Statut Membre Dernière intervention 15 février 2010 - 27 janv. 2005 à 12:30
Bonjour,

Je cherche à renvoyer un tableau de string à partir d'une chaîne de caractères qui contient des séparateurs.
Hélas, la fonction Split n'existe pas dans Access 97 !! ( il me semble).

Ex de chaîne : d1;d2;TextTest
ou bien : d;Toto

Merci d'avance.

EloLydie

3 réponses

crenaud76 Messages postés 4172 Date d'inscription mercredi 30 juillet 2003 Statut Membre Dernière intervention 9 juin 2006 29
27 janv. 2005 à 11:21
Va voir içi ...
http://www.vbfrance.com/forum.v2.aspx?ID=369245

Christophe R
0
elolydie Messages postés 5 Date d'inscription jeudi 2 septembre 2004 Statut Membre Dernière intervention 16 mai 2005
27 janv. 2005 à 12:10
Merci, beaucoup....

EloLydie
0
cs_corsica Messages postés 147 Date d'inscription lundi 13 mai 2002 Statut Membre Dernière intervention 15 février 2010
27 janv. 2005 à 12:30
J'en ai réécrit une vite fait ...

Dim Chaine As String
Dim W_Tableau() As String
Dim I_Tableau As Integer
Dim Pos_PointVirgule As Integer


I_Tableau = 0
Chaine = "a;b;d;f;g;h;j"


While InStr(Chaine, ";")
Pos_PointVirgule = InStr(Chaine, ";")
ReDim Preserve W_Tableau(I_Tableau)
W_Tableau(I_Tableau) = Mid$(Chaine, 1, Pos_PointVirgule - 1)
I_Tableau = I_Tableau + 1
Chaine = Mid$(Chaine, Pos_PointVirgule + 1)
Wend
0
Rejoignez-nous