basically I am trying to use the selected file in open dialog to write to instead of a pre-ordained "logfile"
i want to select the file to write to?
Me.txtFile.Text = ""
ofd.ShowDialog()
Me.txtFile.Text = ofd.FileName
If Not Me.txtFile.Text = "" Then
'Read the existing file
Dim FileText As String = ""
FileText = System.IO.File.ReadAllText(Me.txtFile.Text)
'Write to the log file
System.IO.File.AppendAllText(LogFile,FileText)
Timer1.Start()
Timer1.Enabled = True
MessageBox.Show("B.O.M Transfered")
Else
MessageBox.Show("Please select a file.")
how do i implement the selected file in open file dialog instead of this..
System.IO.File.AppendAllText(LogFile,FileText)
i need
System.IO.File.AppendAllText(what ever file is selected from open file dialog)
i want to select the file to write to?
Me.txtFile.Text = ""
ofd.ShowDialog()
Me.txtFile.Text = ofd.FileName
If Not Me.txtFile.Text = "" Then
'Read the existing file
Dim FileText As String = ""
FileText = System.IO.File.ReadAllText(Me.txtFile.Text)
'Write to the log file
System.IO.File.AppendAllText(LogFile,FileText)
Timer1.Start()
Timer1.Enabled = True
MessageBox.Show("B.O.M Transfered")
Else
MessageBox.Show("Please select a file.")
how do i implement the selected file in open file dialog instead of this..
System.IO.File.AppendAllText(LogFile,FileText)
i need
System.IO.File.AppendAllText(what ever file is selected from open file dialog)