this sounds overly complicated but i'm not too sure how to write that simpler so i'll wright a longer version.
Inside the text file i have this format saved (username, cash) and that repeats on every line. is if possible to find if the username already exists in the file, to add the cash from this turn (entered via text boxes) to the cash in the file for that specific user
after that i require code that searches the code for the username, then outputs the username and cash in separate text boxes
here is some of the code that i started from, but I've only managed to check if username is in the file so far, i haven't been able to do anything with it
Dim vOut As String
vOut = CStr(profit)
Dim Findstring1 = IO.File.ReadAllText("profit.txt")
Dim Lookfor As String = (Username)
If Findstring1.Contains(Username) Then
MsgBox(Findstring1)
Else
file = My.Computer.FileSystem.OpenTextFileWriter("profit.txt", True)
file.Write(vOut)
file.Write(", ")
file.Write(Username)
file.WriteLine("|")
file.Close()
End If