We help IT Professionals succeed at work.

Counting Timer - Up and Down

324 Views
Last Modified: 2017-04-26
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,


B.
Countdown-Timerv6.3.xlsb
Comment
Watch Question

David Johnson, CDSimple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
computers aren't that smart. if cell is blank or zero count up, if valid value count down..

Author

Commented:
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?

B.
David Johnson, CDSimple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
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
Roy CoxGroup Finance Manager
CERTIFIED EXPERT

Commented:
You haven't used any code in the form from what I can see, I'll take a look later.

Author

Commented:
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,

B.
Roy CoxGroup Finance Manager
CERTIFIED EXPERT

Commented:
I created a UserForm with a Timer on a few years ago. I'll try to find it and adapt it.
Roy CoxGroup Finance Manager
CERTIFIED EXPERT

Commented:
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.

Author

Commented:
Roy,

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

B.
Roy CoxGroup Finance Manager
CERTIFIED EXPERT

Commented:
Sorry, I was late home and in a rush. Must have not clicked the attach button.

Author

Commented:
Ha!  Roy, still no attachment!  Get some rest.

B.
Roy CoxGroup Finance Manager
CERTIFIED EXPERT

Commented:
Don't know why it's not attaching
EE_Timer-v1.02.xlsm

Author

Commented:
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.

B.
Roy CoxGroup Finance Manager
CERTIFIED EXPERT

Commented:
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?

Author

Commented:
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?

B.
Roy CoxGroup Finance Manager
CERTIFIED EXPERT

Commented:
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.

Author

Commented:
Let's go with your approach to keep it simple.

Thanks,

B
Professor JMicrosoft Excel Expert
CERTIFIED EXPERT
Top Expert 2014

Commented:
Bright01,

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.

http://www.tushar-mehta.com/excel/software/vba_timer/

Author

Commented:
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.

B.
Roy CoxGroup Finance Manager
CERTIFIED EXPERT

Commented:
I'll get back to this, I need to get the count down working as required.

Author

Commented:
Are we still working on this or should I close it out?
Roy CoxGroup Finance Manager
CERTIFIED EXPERT

Commented:
Sorry, I'm working on it but I've not been too well this last week.

Author

Commented:
No worries.  Just checking.
Roy CoxGroup Finance Manager
CERTIFIED EXPERT

Commented:
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.
Group Finance Manager
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
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,

B.
Roy CoxGroup Finance Manager
CERTIFIED EXPERT

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

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions