Avatar of Bright01
Bright01
Flag 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,


B.
Countdown-Timerv6.3.xlsb
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Roy Cox

8/22/2022 - Mon
David Johnson, CD

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

ASKER
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, CD

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
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Roy Cox

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

ASKER
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 Cox

I created a UserForm with a Timer on a few years ago. I'll try to find it and adapt it.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Roy Cox

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.
Bright01

ASKER
Roy,

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

B.
Roy Cox

Sorry, I was late home and in a rush. Must have not clicked the attach button.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Bright01

ASKER
Ha!  Roy, still no attachment!  Get some rest.

B.
Roy Cox

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

ASKER
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.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Roy Cox

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?
Bright01

ASKER
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 Cox

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.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Bright01

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

Thanks,

B
Professor J

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/
Bright01

ASKER
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.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Roy Cox

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

ASKER
Are we still working on this or should I close it out?
Roy Cox

Sorry, I'm working on it but I've not been too well this last week.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Bright01

ASKER
No worries.  Just checking.
Roy Cox

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.
ASKER CERTIFIED SOLUTION
Roy Cox

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Bright01

ASKER
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.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Roy Cox

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