You can also do it all in one line of code. Keeps fingers happy. :D
RichTextBox1.Text = IO.File.ReadAllText(Open.FileName)
codeorder
Posting Virtuoso
1,915 posts since Aug 2010
Reputation Points: 255
Solved Threads: 384
See if this helps.
Dim sfd As New SaveFileDialog
With sfd
.Title = "Save"
If .ShowDialog = Windows.Forms.DialogResult.OK Then
If IO.File.Exists(.FileName) Then
If MsgBox("Append Text to File?" & vbNewLine & "Clicking No will overwrite the current file.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
'// append code here.
Else
'// overwrite code here.
End If
Else '// if file does not exist.
'// overwrite code here.
End If
End If
End With
codeorder
Posting Virtuoso
1,915 posts since Aug 2010
Reputation Points: 255
Solved Threads: 384