Count Down Timer Across Any Sheet

amoverton2

Board Regular
Joined
May 13, 2021
Messages
77
Office Version
  1. 2016
Platform
  1. Windows
Hi All!!

Searching around I didn't find what I was looking for, maybe my search parameters were off so if this has been done before please let me know.

I'm looking for a code I can apply to a count down timer. I have a workbook that people around my office leave open, so I've fixed that by inputting a code into the workbook that saves and closes the workbook after 15 minutes regardless of activity or inactivity. Here's my wish... Upon opening the workbook and after the initial splashscreen disappears (5 seconds...) I'd like a timer to pop up and automatically start counting down from 15 minutes so the user knows how long they have left. At the 1 minute left time, a message box to pop up to state the user has 1 minute left before the workbook will close. This timer must be able to "stay on top" of every sheet or userform that the user goes to inside the workbook, preferably in the upper right hand corner. Is this doable?

Thanks!!!
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
VBA can provide a continuous timer, but you can't do anything else while VBA is running, so having it continuously updating will prevent users doing anything at all.
You could use VBA that runs very briefly every (say) 5 minutes, and updates the status bar message at bottom left of screen. This will always be visible. When the timer gets to 10, it can pop up a 5 minute warning. You don't want the VBA code running often, because it interrupts whatever users are doing.

There may be an alternative using Office Script, but I don't know that.
You could also set up a python script that launches the spreadsheet and then runs in the background, handling the timer and warning messages and closing of the spreadsheet.
 
Upvote 0

Forum statistics

Threads
1,214,815
Messages
6,121,715
Members
449,049
Latest member
THMarana

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