I'm need a custom procedure where code can be ran at certain times. The parameter used for the function should be number and type and whether to receive focus during the intervals. If the value is true, then when the code runs during the interval, it will receive focus even if the program is minimized. If false, then it will not. The types chosen should be seconds, minutes, hours, days, or weeks. If you can do months and years, I would appreciate that as well. The timer control from Visual Basic would not work because if the time used is more than an hour or so, then it gives you a runtime error. For the sample program, the information put into the function should be 2 and weeks. Also, for the sample, during the intervals, it should display a messagebox saying okay.
## Deliverables
A complete procedure similar to the timer control so code can be ran at predefined intervals.
## Platform
Windows XP, Visual Basic 6.0