Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
SaveFileDialog1.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"
SaveFileDialog1.FilterIndex = 1
If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim myStream As New StreamWriter(SaveFileDialog1.FileName, True)
myStream.Write(RichTextBox1.Text)
myStream.Close()
End If
End Sub