Bonjour
sans chercher à entrer dans ton code, je vois quand même une boucle vide
for I = 1 to 5
Next I
normal ? oubli dans le collage ?
Cordialement
JackL
Dominique a écrit :
Bonjour,
Je désire afin de reprendre un code VBA, transposer une lecture de
fichier via une listeBox, contenant des groupes de cinq enregistrement
chacun genre;
1
2
3
4
5
6
7
8
9
10
Afin de pouvoir lire tous les premier mots de chaque groupe et
exploiter les données suivantes correspondantes
Sub Lire()
Dim f1 As Integer
Dim unTexte As String
Dim nomFichier as string
Dim dlg as object
Dim Tf1 as object
Dim tt as string
Dim I as string
DialogLibraries.LoadLibrary("Library1")
Dlg = CreateUnoDialog( DialogLibraries.Library1.Dialog3)
Dim uneLigne As String
nomFichier = "a:\essailiste.txt"
f1 = FreeFile ' obtenir un numéro de fichier ouvert
Open nomFichier For Input As #f1
dlg.Execute()
While not Eof(1)
Line Input #f1, unTexte
Tf1 = dlg.GetControl("ListeNom")
Tf1.text = unTexte
for I = 1 to 5
Next I
Wend
Close #f1
dlg.dispose ()
end sub
sub choixList ()
Dim f1 As Integer
Dim unTexte As String
Dim nomFichier as string
Dim dlg as object
Dim Tf1 as object
Dim tt as string
Dim I as string
Open nomFichier For Input As #f1
do
Line Input #f1, unTexte
Tf1 = dlg.GetControl("ListeNom")
loop until Tf1.text = unTexte
Line Input #f1, unTexte
Tf1 = dlg.GetControl("label1")
Tf1.text = unTexte
Close #f1
end sub
Quelqu'un peut il m'aider
Merci
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]