As it is now, the macro will run itself every interval. So, all you need to do is to put your macro code underneath where it says "Put your code here" and you should be good to go. If you want this to run another macro, just replace "RunMacro" (that comes at the end of the macro) with the name of the macro that you want to run.
By default, this macro runs every 5 minutes. If you want to change that, simply change this part of the code "00:05:00" to whatever you want with hours on the left, minutes in the middle, and seconds on the right.
Where to install the macro: Module
- Code: Select all
Sub RunMacro()
'Put your code here
Application.OnTime Now + TimeValue("00:05:00"), "RunMacro"
End Sub