User a timer control on a form. Set the timer interval to be whatever you want.
The form must be open all the time.
IN the timer event you would put somthing similar to your code above. If you start your automated procedure, set the timer interval to 0 and when you are finished set it back to the original setting. This will stop multiple instances of you procedure running.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.