tump
Messages postés82Date d'inscriptiondimanche 25 juillet 2004StatutMembreDernière intervention 6 avril 2006
-
30 avril 2005 à 23:33
cs_CanisLupus
Messages postés3757Date d'inscriptionmardi 23 septembre 2003StatutMembreDernière intervention13 mars 2006
-
5 mai 2005 à 10:59
bonjour a tous !
jexecute ce code pour ecrire 40 lignes dans mon txt
je n'ai aucun bug lors de l'execution, pourtant le fichier reste vide!!!
avez vous une explication ?
Dim fs
As
New FileStream("E:\vb\test\test.txt", FileMode.Create)
cs_CanisLupus
Messages postés3757Date d'inscriptionmardi 23 septembre 2003StatutMembreDernière intervention13 mars 200621 1 mai 2005 à 11:06
Salut,
Tu n'aurais pas oublié un sr.close() après ta boucle d'écriture ?
Et puis, que fait le end en plein milieu de ton code ? Les sr.Flush() et fs.Close() ne seront jamais exécutés.
jpleroisse
Messages postés1788Date d'inscriptionmardi 7 novembre 2000StatutMembreDernière intervention11 mars 200627 1 mai 2005 à 00:08
Private Sub Command1_Click()
Dim maligne As String
Dim i As Integer
Open "E:\fs.txt" For Output As #1
For i = 1 To 40
maligne = "il y a " & i & " lignes"
Write #1, maligne
Next i
Close #1
End
End Sub