salut bonne question ?
'tu voie i y a 12 text box sa c'est pour les ouvrir 'directement lorsque ton prog est lancer 'tu peut mettre sa dans command1_click.(bouton) '------------------------------------------------------- Private Sub Form_Load() Dim f As Integer Dim alarme As String
'sa c'est le chemin carnet\alarme.dat sa por etre (.txt)
alarme = App.Path & "\carnet\alarme.dat" f = FreeFile Open alarme For Input As f ' Ouvre le fichier
'Open alarme For Input As f ' Ouvre le fichier. Input #f, a Text1 = a Input #f, B Text2 = B Input #f, C Text3 = C Input #f, D Text4 = D Input #f, E Text5 = E Input #f, U Text6 = U Input #f, G Text7 = G Input #f, h Text8 = h Input #f, I Text9 = I Input #f, J Text10 = J Input #f, K Text11 = K Input #f, L Text12 = L Close #f End Sub '------------------------------ sa c'etais pour le chargement maintenant voyons pour l'ecriture pas plus compliqué '------------------------------ Private Sub command1_Click() Dim f As Integer Dim alarme As String alarme = App.Path & "\carnet\alarme.dat" f = FreeFile Open alarme For Output As f ' Ouvre le fichier. Write #f, Text1.Text Write #f, Text2.Text Write #f, Text3.Text Write #f, Text4.Text Write #f, Text5.Text Write #f, Text6.Text Write #f, Text7.Text Write #f, Text8.Text Write #f, Text9.Text Write #f, Text10.Text Write #f, Text11.Text Write #f, Text12.Text Close #f End Sub '-----------------------------
------------------------------- Réponse au message : -------------------------------
Je cherche comment je peux enregistrer les données contenues dans plusieurs "Text" (text1.text, text2.text,...) dans 1 seul fichier et comment je pourrais le réouvrir. Aidez-moi svp !!!
Olisoft
|