Saving data into a text file in VB6

In this tutorial, it shows you on how to append data from Visual Basic into text file.

How it works?

1. Design user interface. Add controls (Textbox, Label and Button) to the form layout. 




2.Write the code inside the cmdSubmit_Click event.

       Private Sub cmdSubmit_Click()
       Open "Sample.txt" For Append As #1
       Write #1, txtName.Text
       End Sub

3. Input Name inside the Textbox. Then Run the program
4. Open the Sample.txt of view the output.


Happy coding :)