Count Down Timer

JustinJ

New Member
Joined
Sep 19, 2020
Messages
16
Office Version
  1. 2013
Platform
  1. Windows
Hi All,
I have an excel file that I do not want to be shared. However, it will have multiple users throughout the day and is stored on a server. I set a time limit on the file to automatically save and close after 15 minutes. I would like to have a timer so the users can see how much time they have left to complete their inputs. Does any one have any suggestions?

This is my code for the timer, but I would like for it to reset before closing or immediately after opening:
VBA Code:
 Sub timer()

     interval = Now + TimeValue("00:00:01")

     If Range("A1").Value = 0 Then Exit Sub

     Range("A1") = Range("A1") - TimeValue("00:00:01")

     Application.OnTime interval, "timer"

 End Sub
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Use the workbook open event to set the cell value? If I can see this, what's stopping me from increasing the value in the cell?
I think I would use that open event to set a public variable value and have the code subtract from that rather than
a) keep hitting the sheet for a value
b) having to worry about anyone altering the cell value.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

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