This is "part" of my code
Imports System
Imports System.IO
Imports System.Text
Public Class Form2
Public fo1 As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim path As String = Directory.GetCurrentDirectory() & "\test.txt"
If File.Exists(path) Then
My.Computer.FileSystem.WriteAllText(path, fo1, True)
Else
Dim fs As FileStream = File.Create(path)
End If
End Sub
End Class
fo1 is this : fo1 = OpenFileDialog.FileName()
No errors but not writeing to file
if i replace fo1 with any text "test text" it works
I am noob in vb just started useing