VB.NET - How To Export RichTextBox Text To Txt File In Visual Basic.NET
In This VB.NET Tutorial We Will See How To Write RichTexBox Text Into Txt File In Visual Basic .NET Programming Language .
Project Source Code:
Imports System.IO
Public Class Export_Text_To_Txt_File
Private Sub BTN_EXPORT_Click(sender As Object, e As EventArgs) Handles BTN_EXPORT.Click
Dim writer As TextWriter = New StreamWriter("C:\folder\Text.txt")
writer.Write(RichTextBox1.Text)
writer.Close()
MessageBox.Show("Exported")
End Sub
End Class