VBA Form - Need Button - Time - Start & pause

VBABEGINER

Well-known Member
Joined
Jun 15, 2011
Messages
1,232
Dear All

Is it possible to do start and pause the time on VBA Form..?

For example,
I have select any activity type from Combo box 1.

Time start in Text box.

after half an hour, user wants to take a break. Here, user can click a button say, "Pause". It will stop that time, and if he selects break option then break option text box time will start..

When again resume from break, user will stop the break time and will start the activity which he placed in "pause"

Can anyone please suggest on this...
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi Logit, Many thanks for your revert. Happy to see.

But, my requirement is in Chrono 01 button. The updated version you have provided is contains the same thing which i dont want.

I want Start Stop button. Clock should be in this format...HH:MM:SS, Dont want micro second's.
like,
00:00:01
00:00:02
00:00:03
00:00:04
.
.
.
.
.
00:00:59
00:01:00
00:01:01
00:01:02
00:01:03
.
.
.
00:01:59
like this..
can you please do this..
 
Upvote 0
Upvote 0
.
What you are seeking is the ability to pause the timer, then return and restart it where it left off. As I best understand
your original request.


Whether the button says "STOP" or "PAUSE" or anything else does not make a difference with the code behind the button.
The last file attached, Post #24 , accomplishes your goal as I understand it even though the button may say "STOP".
When you click the "STOP" button it does not cancel all of the time that has been accumulated so far. It simply STOPS the timer.
Then the caption turns to "START". When you click the button again, it re-starts the timer from where it left off. Precisely what
you were seeking ... as best I understand your original request.


The "CLEAR" button resets the timer completely, requiring you to begin the timing again .. starting at ZERO.


I've attached a slightly modified version here. The only difference is the START button changes to PAUSE after you click it and the timer
begins. When you click the button when it say PAUSE ... the caption changes to START. When you click the button when it says START
the time picks up where it left off. Again, as best I understand your requirements, this should do as you wanted. In the attached
if you click the CLEAR button, it will reset the timer to ZERO and everything begins again as though no time had been measured at all.


The attached also does not track the micro-seconds. It only tracks the hours / minutes / seconds. Again, as best I understand your
request ... this should meet that goal.

If this attached file or the last attached file, Post #24 , do not meet your needs you will need to obtain assistance from another member of
the Forum.

Thank you for the opportunity to construct this project for you.

Have a great day !

Download newest version here :

https://www.amazon.com/clouddrive/share/IqN2kO3sXob3zumFjM3P30jsncK4ZqUuEJDG7laU7rt
 
Last edited:
Upvote 0
Hi logit..

Thanks for all the efforts you made. I highly appreciated this.

But still im not get my solution. I'm not explaining again here..but just clarifying what i said..

= Chrono 02 button is totally perfect solution for me.
Only change needed in that is, micro seconds i dont want.
Current Chrono 02 format -- MM:SS:microseconds microseconds (which is not required.)

I want Current Chrono 02 format -- HH:MM:SS


Anyways, I will search something else. Thanks..
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,977
Members
449,200
Latest member
Jamil ahmed

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top