The file is being created and it is somewhat working. It works okay if you have the program open and enter like 3, 4, 1. It's supposed to subtract these from 10. It does so, saying that you have 2 hours left. But once it's shut down and you check the file, it is only holding the last number entered, not all of them. This leave me with a few questions:
How can I make the file hold all of the values, even after the program is shut down?
I need to make a Reset button to clear the file out. How do I make this happen?
Here's this section of code so far:
Private Sub submitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles submitBtn.Click
SaveTextToFile(timeSpentTxt.Text, "C:\Documents and Settings\All Users\Documents\College-C\IT\VB.Net\Assignments\Semester Project\ATV Records\runningTally.txt")
'var declarations
Dim todaysTime As Decimal = Val(timeSpentTxt.Text)
runningTally += todaysTime
timeRemaining = 10 - runningTally
timeRemainingOutputLbl.Text = timeRemaining
lifetime += runningTally
lifetimeHrsOutputLbl.Text = lifetime
End Sub Private Sub submitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles submitBtn.Click
SaveTextToFile(timeSpentTxt.Text, "C:\Documents and Settings\All Users\Documents\College-C\IT\VB.Net\Assignments\Semester Project\ATV Records\runningTally.txt")
'var declarations
Dim todaysTime As Decimal = Val(timeSpentTxt.Text)
runningTally += todaysTime
timeRemaining = 10 - runningTally
timeRemainingOutputLbl.Text = timeRemaining
lifetime += runningTally
lifetimeHrsOutputLbl.Text = lifetime
End Sub