Visual Basic (2013) is refusing to work properly, so I have no way of testing my code, and as you can probably tell i have no clue. I am trying to take information from a csv file and use VB to write a certain part of data in the csv to a separate text file. This is my code so far:
Imports System.IO
Public Class Form1
Dim inFile As StreamReader = Nothing
Dim outFile As StreamWriter = Nothing
Dim sFilename As String = "C:\etc"
Dim inputText As String
Dim FileNumber As Integer
Dim FileName As String = ""
Private Sub ReadWrite()
FileNumber = FreeFile()
FileOpen(FileNumber, FileName, OpenMode.Output, OpenAccess.Write)
outFile = New StreamWriter(sFilename)
inFile = New StreamReader(sFilename)
Dim i As String() = Split(sFilename, ",", , CompareMethod.Text)
inputText = inFile.ReadToEnd()
inFile.Close()
TextBox2.Text() &= "Testtt mcgee" & vbCrLf
TextBox2.Text() &= inputText
TextBox2.Select(0, 0)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
ReadWrite()
End Sub
End Class
It is nowhere near complete, but i don't have the faintest of what to do next.