vba excel 2003 - Insérer fichier txt
bonjour,
Comment insérer un fichier texte dans une textbox de mon formulaire?
j'ai essayé par
création d'un module
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
Sub LireFichier()
Dim chemin As String
Dim nomFichier As String
nomFichier = frmRecherche.txtNumClient
chemin = ActiveWorkbook.Path & "\Rapport\" & nomFichier & ".txt"
Open chemin For Input As #1
Do While Not EOF(1)
frmRecherche.txtRapport.Text = chemin
Loop
Close #1
End Sub |
puis à l'activation de lu formulaire
Code:
1 2 3 4 5
|
Private Sub UserForm_Activate()
LireFichier
End Sub |
et Là plantage royal, excel complètement bloqué,on dirait que la boucle n'arrete pas , je crois?
une idée