Hello All,

I'm developing a new application which is going to be used to store statistics based on the button which is pushed. Essentially, the program is going to have 5 buttons (A-E) and there will also be a text box at the bottom for entering a number (default is 1).

When the user presses a button, I'd like the program to store the number into a text document.

There will be one file for each day and in the file, it will say something like this (by default):

[A] = 0
[B] = 0
[C] = 0
[D] = 0
[E] = 0

If the user presses the A button, then I'd like my program to open the txt file, and add the number in TextBox to the value in the text file. If C is pressed, it'll add that number to the C value in the text document. (Following me?)

Can anyone help me with some syntax on how this would be done, while preserving the text box structure? (No extra line breaks, anything like that) I guess I need help building code to search the textbox, pull out the value from the correct line (A-E depending on the button), then adding that value to a (integer) which is the value from the text box in the program, and then store that value back onto the correct line in the text file.

I think this may sound harder than it actually is going to be... but I'm still a very much newbie when it comes to reading and writing to text files.

Thanks in advance!