I would like to create a timer that meets the following needs:
- Counts from zero to one minute
- At one minute, displays "Limit Reached - Begin Overtime"
- Continues to count upward but pulls additional time from limited pool of 20 minutes
- When limited pool is exhausted, displays "Overtime Limit Reached"
- Reset function available to reset zero to one minute, but NOT overtime pool
- Can be repeated for multiple objects/people
To help explain how the timer will be used, consider a chess game. Each person only has one minute to make a move. Each person also has a pool of 20 additional minutes that can be spent when needed. Thus, a person can take 2 minutes to make a move and be left with 19 in the pool. That person gets the first minute free each turn, which is why the reset function is needed, but the 20 minute pool will only ever decrease. I'd also like to be able to asjust the 1 minute and 20 minute options to make them larger or smaller, so creating a box that the code pulls from would be ideal.
Finally, I'll need to make eight separate instances of this code for eight separate people. Each pool must be independent of the other pools. I'll need to be able to make one person have a 20 minute pool, another have a 40 minute pool, another have 28 minutes, and so on.
Here's what I've done so far using. I right-clicked on a cell and changed format to mm:ss and used this as the set cells. I then put "1:00" and "20:00" into them for 1 minute and 20 minutes, respectively. I then opened the VBA and created a module on that sheet. This is the code so far:
Issues so far:HTML Code:
- Code does not function as intended: no display messages, pool does not count down
- No Start/Stop/Rest Buttons
- No multiple clocks
Any help that could be given is greatly appreciated. I'm fairly good at programming (mostly MATLAB), but VBA is entirely new to me so I don't know what commands/options are available. I'm also on a bit of a time crunch and can't spend a lot of time trying to figure it out myself. Thanks in advance!
Bookmarks