Si ta chaine (Chaine) est exactement ce que tu as écrit,
tu mets sur ta feuille une TextBox (TextBox) avec la propriété MultiLine = True et un bouton de commande (Command1) et tu saisis le code :
Private Sub Command1_Click() Dim tableau() As String separateur = Chr(34) & Chr(32) & Chr(34) ' c'est à dire " " tableau() = Split(Chaine, separateur) tableau(0) = Mid(tableau(0), 2) tableau(UBound(tableau)) = Left(tableau(UBound(tableau)), Len(tableau(UBound(tableau))) - 1) For i = 0 To UBound(tableau) TextBox.Text = TextBox.Text & tableau(i) & vbCrLf Next End Sub
|
-------------------------------
Réponse au message :
-------------------------------
>
>
> Ok mais comment je l'utilise cette fonction ?
>
> merci d'avance
>
> -------------------------------
> Réponse au message :
> -------------------------------
>
> > Bonsoir
> >
> > La fonction Split doit permettre ça.
> >
> >
> >
> > -------------------------------
> > Réponse au message :
> > -------------------------------
> >
> > >
> > > JE vous explique :
> > > jai une chaine de caractère qui est en fonction d'un certain nombre de critères:
> > > la suivante :
> > >
> > > "E:\MP3\(05) Red Hot Chili Peppers - Coffee Shop.mp3" "E:\MP3\(06) Red Hot Chili Peppers - Pea.mp3" "E:\MP3\(07) Red Hot Chili Peppers - One Big Mob.mp3" "E:\MP3\(08) Red Hot Chili Peppers - Walkabout.mp3" "E:\MP3\(09) Red Hot Chili Peppers - Tearjerker.mp3" "E:\MP3\(10) Red Hot Chili Peppers - One Hot Minute.mp3"
> > > et je voudrais la formater de sorte que ca donne :
> > > E:\MP3\(05) Red Hot Chili Peppers - Coffee Shop.mp3
> > > E:\MP3\(06) Red Hot Chili Peppers - Pea.mp3
> > > E:\MP3\(07) Red Hot Chili Peppers - One Big Mob.mp3
> > > E:\MP3\(09) Red Hot Chili Peppers - Tearjerker.mp3
> > > E:\MP3\(10) Red Hot Chili Peppers - One Hot Minute.mp3
> > >
> > >
> > > donc voila ca doit etre con mais je sais pas comment faire
> > >
> > > mErci d'avance
> > >
> > >
> >
>