Link to home
Start Free TrialLog in
Avatar of Bright01
Bright01Flag for United States of America

asked on

Counting Timer - Up and Down

After great work by 4 EE Pros, Brad Yandt, Professor Jim Jam, Ramin and Roy Cox, I got a great little Countdown Timer that I can use.  As generally the case, the  more I worked with this Team of professionals, the more I realized I could make this even better and albeit simpler.

So here is the ask.  I'm attaching the work that has been done on the Countdown Timer + a Form that I have produced to demonstrate what this should look like.  I thought I'd use a form so you can call it up, set the timer and then hide it easily.  The original countdown timer works by using the two Worksheets.  The one I'm asking for uses the Form only.  What is different also is that it should count down if a number is entered into the Excel cell (in the form) that is formatted for time.  If the number is not 0:00:00, then when you press the Count! button it should count up (no set ending).  If a number is entered, say 1:30:00 it would then realize it's a count down and when you click on Count, it counts down and then announces  when the time is up (Roy put this in the original code -- way cool!).  

That's it!   Hope you engage with this one.  It's a little bit more complicated but I'm looking forward to learning how to do this by watching you pros.

Thank you in  advance,

Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

computers aren't that smart. if cell is blank or zero count up, if valid value count down..
Avatar of Bright01


What?   If you "fire" the Count! Macro, it can't check  to see if Cell<> or = to -0-, so begin count, otherwise, take the number and count down?

The original way that I read it was, if there is a value it was ambiguous whether or not to count up or count down. It appears I was mistaken
You haven't used any code in the form from what I can see, I'll take a look later.
Roy,  I'm not skilled at moving code from Modules and Worksheets into Forms.  I think the code you guys put together before did the job so most of it can be transferred into the form.  EXCEPT for the streamline of determining count up  or count down.

Thank you,

I created a UserForm with a Timer on a few years ago. I'll try to find it and adapt it.
This example has a Start, Stop & Pause Button. Check it out and let me know if it is on the right track. If it is I need to figure out the count down part.

I'll try to take a look tomorrow.

Thanks for the effort.  Did you mean to attach something?

Sorry, I was late home and in a rush. Must have not clicked the attach button.
Ha!  Roy, still no attachment!  Get some rest.

Don't know why it's not attaching
Roy,  Welcome back!  Almost there!  Very well done so far;

Two items;

There needs to be a reset capability to clear the Countdown/Countup cells.  And 2, I can't get the countdown to work.  If I put in 01:00:00 as in 1 hour, and hit start, it starts to count up when it should recognize that there is an entry in the countdown cell and begin counting down instead.

Thank you very much for your work.  I can tell you work hard at what you do and concurrently enjoy helping others.  Thanks again.

I haven't put in a count down yet.

I am confused though about your reference to a cell, do you mean the TextBox on the UserForm?
Sorry I was not clear.  What I'm thinking is that the countdown and countup box are the same box.  If the number in the box is -0- or blank, then it counts up.  However, if there is a number such as 01:00:00, then it automatically knows that it is a countdown situation.

Make sense?

If that is the case then the pause button won't work. The time is currently in a Label which prevents entry. I thought to add a TextBox to enter a time in.
Let's go with your approach to keep it simple.


Avatar of Professor J
Professor J


i am not sure what are you trying to achieve with this Countdown timer, but there is a very good free Add-in Developed by Tushar Mehta you can have a look and see how it works, maybe that would help.
Professor Jim,

Did you see Roy's posted WB/WS?

The timer counts Up and counts Down.  I'll take a look at Tushar's work too.

I'll get back to this, I need to get the count down working as required.
Are we still working on this or should I close it out?
Sorry, I'm working on it but I've not been too well this last week.
No worries.  Just checking.
I've managed to get the count down working as I wanted.

I've added a quick entry for times.

I just need to tidy up the userform and I'll upload a completed file.
Avatar of Roy Cox
Roy Cox
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Roy, Thank you so much for sticking with this endeavor.  Well done!  I'll be working on it until I break it which is when I'll author a follow on question.  Again, great job!  You have a lot of tenacity to stick with things until completed.

Best regards,

No problem B. Let me know what you need to do further