Parcourir un tableau avec foreach

Résolu
zn415 Messages postés 62 Date d'inscription samedi 23 juin 2007 Statut Membre Dernière intervention 21 novembre 2015 - 7 déc. 2010 à 10:37
zn415 Messages postés 62 Date d'inscription samedi 23 juin 2007 Statut Membre Dernière intervention 21 novembre 2015 - 7 déc. 2010 à 10:59
Bonjour je cherche Comment utiliser foreach pour traiter une chaine précedament splité. J'ai donc un tableau que je veux parcourir. Comment faire?

Text1.Text="12-12-45-545-848-4784"
T = Split(Text1.Text, "-")


????????????
ForEach T
MsgBox()
Next


Merci d'avance
A voir également:

2 réponses

pile_poil Messages postés 682 Date d'inscription vendredi 6 avril 2007 Statut Membre Dernière intervention 4 août 2012 6
7 déc. 2010 à 10:50
for i = 0 to ubound(T)
ça marche parfaitement dans ce cas. ForEach est à réserver aux collections

si c'est la solution, penser : REPONSE ACCEPTEE
3
zn415 Messages postés 62 Date d'inscription samedi 23 juin 2007 Statut Membre Dernière intervention 21 novembre 2015
7 déc. 2010 à 10:59
Merci, ça marche

For i = 0 To UBound(T)
MsgBox (T(i))
Next


Foreach est déppassé en vb? C'est pourtant pratique en php.
3
Rejoignez-nous