I'm trying to create a program that will only let the user do a certain amount of tasks per 24 hours. The program is very basic and looks kinda like this:

VB Code:
  1. Dim DailyLog As Integer
  2. Dim i As Integer
  3.  
  4. Private Sub Timer1_Timer()
  5. If i >= DailyLog Then
  6.         Label5.Caption = "Done with your daily limit!"
  7.         Exit Sub
  8. End If
  9.  
  10.  
  11. 'Code for sending message
  12. i = i + 1
  13.  
  14. Timer1.Enabled = False
  15. Timer2.Enabled = True
  16. End Sub

Now, when you look at this, you might think that the i = i + 1 wont work, but I"ve left out a lot of code...in my program it does work.

Here's my question:

If the user closes out the program and starts it again, the program will say that i = 0, but what I want it to do is retain its last value. That value should then reset after 24 hours. Can this be done with the date function.