jackweekes
Member
- Joined
- Apr 22, 2010
- Messages
- 5
- Programming Experience
- Beginner
Please could you help this code works fine:
But when I add to the code (bellow) it fails to write to the file.
VB.NET:
Private Sub ButtonBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonBrowse.Click
Call Save()
End Sub
Shared Sub Save()
Dim Writer As StreamWriter = New StreamWriter("Data.txt")
Writer.WriteLine("HELLO")
Writer.Close()
MsgBox("HELLO")
End Sub
But when I add to the code (bellow) it fails to write to the file.
VB.NET:
Private Sub ButtonBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonBrowse.Click
OpenFileDialog1.ShowDialog()
PictureBox1.ImageLocation = OpenFileDialog1.FileName
MsgBox(PictureBox1.ImageLocation)
Call Save()
End Sub
Shared Sub Save()
Dim Writer As StreamWriter = New StreamWriter("Data.txt")
Writer.WriteLine("HELLO")
Writer.Close()
MsgBox("HELLO")
End Sub