i want to run a macro every minute after a given time value.have used below code but i stops at 7.46 .pl help
Application.OnTime TimeValue("07:45:00"), + TimeValue("00:01:00"), "Macro5"
i want to run a macro every minute after a given time value.have used below code but i stops at 7.46 .pl help
Application.OnTime TimeValue("07:45:00"), + TimeValue("00:01:00"), "Macro5"
You need to have another macro setup that will then run the macro every one minute, something like this:
Sub macro_timer()
'Tells Excel when to next run the macro.
Application.OnTime Now + TimeValue("00:01:00"), "my_macro"
End Sub
Then, at the end of the macro that runs, call the timer macro again like this:
'Calls the timer macro so it can be run again at the next interval.
Call macro_timer