Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

run a macro every minute after a given time value

0

 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"

Answer
Discuss

Answers

0

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
Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login