We can't really help you - we can't see your code other than the brief fragment you show us, and that would appear to do what you are asking for, though there are better ways to do that. For example, your
SaveTimeValue
method could be replaced with
File.WriteAllText(filePath, Label1.Text)
And the load event handler with
If File.Exists(filePath) Then
File.ReadAllText(filePath, Label1.Text)
End If
Or better, use the Settings file instead:
Manage application settings (.NET) - Visual Studio (Windows) | Microsoft Learn[
^] - That will allow you to manage a TimeSpan object directly, instead of having to convert it from a string each time you want to update it.
Create a class level TimeSpan value and add or remove time from that, then update the Label.Text field from that value, and save your settings value when you exit, reload it when you load the form. You can have multiple settings values a lot easier that way, so you can also have class level TimeSpan variables for your other labels which are also preserved in the same way.
If you'd rather try to fix the existing code - and I wouldn't - then I'd start by using the debugger to check what is going on by putting a breakpoint on the first line of the Load handler and watching what path it took through the code. Probably, you'll find that the
filePath
isn't set or isn't set correctly and it's not loading because of that, or that something else in your code (that we can't see) is resetting the Label value, maybe when you "restart the count".
Sorry, but we can't fix what we can't see!