How does one execute some VBA code periodically, completely automated?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use Application.OnTime to schedule a macro to be executed periodically. For example create a module with the code below. Call ‘Enable’ to start the timer running.
It is important to stop the timer running when you close your workbook: to do so handle Workbook_BeforeClose and call ‘Disable’
Alternatively you can use the Win32 API SetTimer/KillTimer functions in a similar way.