Many thanks for this example of how to create a timer. My question is how do I get this code replicated in several worksheets in the same workbook so that a timer is available in each worksheet. Thanks for your insights. Rick.
I'm having trouble stopping the timer. I can do it with a button, if that's the only thing the button does, but if I call the stop_timer sub from another sub, it causes an error, specifically on this line: Application.OnTime Now + TimeValue("00:00:01"), "next_moment", , False
I found a solution, but it's kind of ugly. Instead of using the stop_timer sub to stop the timer, I just tell it to set the timer to =100. Then I added into the next_moment sub under the part about stopping it if time =0, that if time =100, then it should also exit sub. It actually works perfectly now. But still curious.
Is it possible to add a beep sound to indicate that the timer has reached zero? So that I won't have to watch it. It would be awesome if it could be done! Thank you for the tutorial.
Thanks for the video. Could this work by having a pre-defined interval (90sec) from a field where the time of day is entered, without having to push any buttons. So, it would just check cell A1 and if it is formatted for time, and a time is entered, this timer automatically begins?
can u give me a copy of the code u type in macro please, because mine is not working even i copied the entire word spelling spaces punctuations and so on but stil not working though. thank u
This tutorial is for learning. You can pause tutorial at any point and understand it. If you need file then let me know your email address at EXCELDESTINATION@GMAIL.COM. i will see if I have file, I will share it with you. Thanks again.
I tried but there is a bug when I click on start. I am using Excel 2010. What's wrong with my code? Sub start_time() Application.OnTime Now + TimeValue("00:00:01"), "next_moment" End Sub Sub end_time() Application.OnTime Now + TimeValue("00:00:01"), , False End Sub Sub next_moment() If Worksheets("sheet1").Range("A2").Value = 0 Then Exit Sub Worksheets("sheet1").Range("A2").Value = Worksheets("sheet1").Range("A2").Value - TimeValue("00:00:01") start_time End Sub
Without looking at your code, I can say about error. I have written very simple code for this tutorial. May be, you can send me your file. I will look at that and try to respond.
Many Many thanks for your coding explain
thanks sir ji you are great i am your fan keep sharing knowledge
Thanks Sandeep!
Many thanks for this example of how to create a timer. My question is how do I get this code replicated in several worksheets in the same workbook so that a timer is available in each worksheet. Thanks for your insights. Rick.
Great work, many thanks
Many thanks!
I'm having trouble stopping the timer. I can do it with a button, if that's the only thing the button does, but if I call the stop_timer sub from another sub, it causes an error, specifically on this line:
Application.OnTime Now + TimeValue("00:00:01"), "next_moment", , False
I found a solution, but it's kind of ugly. Instead of using the stop_timer sub to stop the timer, I just tell it to set the timer to =100.
Then I added into the next_moment sub under the part about stopping it if time =0, that if time =100, then it should also exit sub. It actually works perfectly now. But still curious.
Can i save data in sheet2
How to fix the timer at for example 15mins. So i dont have to re enter everyday when i open the sheet
Dear how I can make the timer change the color after 15 seconds?
And add sound when the time end?
i would like to ask this also
thank you
Is it possible to add a beep sound to indicate that the timer has reached zero? So that I won't have to watch it. It would be awesome if it could be done! Thank you for the tutorial.
Yes, it is possible. If you want this to be done in your file, send me email at exceldestination@gmail.com
i got an error that says
Runtime error '424' :
Object Required
pls help
Thanks for the video. Could this work by having a pre-defined interval (90sec) from a field where the time of day is entered, without having to push any buttons. So, it would just check cell A1 and if it is formatted for time, and a time is entered, this timer automatically begins?
How to add as msg box after the time laps ?
add msgbox()
can u give me a copy of the code u type in macro please, because mine is not working even i copied the entire word spelling spaces punctuations and so on but stil not working though. thank u
thks,
Welcome
sr how can i download this excel sheet
This tutorial is for learning. You can pause tutorial at any point and understand it. If you need file then let me know your email address at EXCELDESTINATION@GMAIL.COM. i will see if I have file, I will share it with you. Thanks again.
I tried but there is a bug when I click on start. I am using Excel 2010. What's wrong with my code?
Sub start_time()
Application.OnTime Now + TimeValue("00:00:01"), "next_moment"
End Sub
Sub end_time()
Application.OnTime Now + TimeValue("00:00:01"), , False
End Sub
Sub next_moment()
If Worksheets("sheet1").Range("A2").Value = 0 Then Exit Sub
Worksheets("sheet1").Range("A2").Value = Worksheets("sheet1").Range("A2").Value - TimeValue("00:00:01")
start_time
End Sub
send me your file.......I will correct and reply.
Sir, please explain the end time to stop the timer. I tried with your code making it false but it gives error.
Without looking at your code, I can say about error. I have written very simple code for this tutorial. May be, you can send me your file. I will look at that and try to respond.
i want it to start with single button and when it became 0 it stops and became 45
amigo el segundo código me da error porque será ojalá pudieras mandarme la platilla
I found some error like "cannot run the macro 'Book1!next_momet
Very very bad audio
This audio is terrible.