cs_BeCaSiNe
Messages postés80Date d'inscriptiondimanche 23 février 2003StatutMembreDernière intervention16 juin 2008
-
27 juin 2003 à 12:52
nhervagault
Messages postés6063Date d'inscriptiondimanche 13 avril 2003StatutMembreDernière intervention15 juillet 2011
-
27 juin 2003 à 15:19
Comment sauvegarder un ListBox ?
Dernier question !
nhervagault
Messages postés6063Date d'inscriptiondimanche 13 avril 2003StatutMembreDernière intervention15 juillet 201137 27 juin 2003 à 15:19
dans un fichier txt
Private Sub Command1_Click()
Dim fso As New FileSystemObject
Dim ts As TextStream
Dim c As Integer
Set ts = fso.CreateTextFile("c:\sauv.txt")
c = List1.ListCount
For i = 0 To c - 1
ts.WriteLine (List1.List(i))
Next
ts.Close
End Sub
Private Sub Form_Load()
For i = 0 To 20
List1.AddItem "item " & i
Next
End Sub