Public Class Form1 Dim pass As String Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If OpenFileDialog1.ShowDialog() = DialogResult.OK Then TextBox1.Text = (My.Computer.FileSystem.ReadAllText(pass)) End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If pass = vbNullString Then If SaveFileDialog1.ShowDialog() = DialogResult.OK Then pass = SaveFileDialog1.FileName Else Exit Sub End If End If My.Computer.FileSystem.WriteAllText(pass, TextBox1.Text, False) End Sub End Class