output to a file

hazejean

Well-known member
Joined
Jul 11, 2003
Messages
68
I have a situation where I have many forms that I run in sequence.
I want to put out put from each form to an external text file or WORD file.

Antysuggestions?
thanks
 
heres a quick example of using the IO.StreamWriter :
Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim strText As String = "im some text thats going to be in your new .txt file" & Environment.NewLine & "and im multilined!"
        Dim sWriter As IO.StreamWriter = New IO.StreamWriter(New IO.FileStream("D:\a_test.txt", IO.FileMode.OpenOrCreate))
        sWriter.Write(strText)
        sWriter.Close()
    End Sub
 

Similar threads

Back
Top