• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Auto exit after reaching the threshold time

Raja Kamarthi

New Member
Hello Friends,


Greetings for the day!!!


I am looking out for a VBA script which should run a descending timer after opening an excel file and the file should auto exit once the timer clocks 00:00:00.


For example, I have set a threshold time of 5 minutes to edit/view a file post which the file should shutdown automatically. Once I open the file, the timer should start running (something like 00:05:00) and should be displayed till it touches its threshold time.


Also when the timer clocks 00:00:10 then an alert should pop up stating that "The file will close in next 10 seconds". AFter these 10 seconds the file should exit


Is this doable through VBA script?


Regards,

Raja
 
Hi Raja ,


Have you gone through this link ?


http://www.teachexcel.com/free-excel-macros/m-13,close-workbook-time-limit.html


In case you want to learn more , go through this link :


http://www.tushar-mehta.com/excel/software/vba_timer/


Narayan
 
Hi Narayan,


Much thanks for sharing the link. I was just looking out for this. The code works as I wished but is missing out on one aspect.


There should be live timer dispayed & running. If not a timer atleast a pop up box something in a rectangle/square or circle form written as "This file will close in XXX seconds" and XXX seconds would be on decremental basis


Regards,

Raja
 
Hi Raja ,


There are two points :


1. There are VBA programs on the net which will display a live timer ; this will slow down worksheet operations a little.


2. A pop-up box is not advisable , since it will cover a part of the screen , and possibly hamper the user's actions. Probably a cell can be dedicated for the timer , or you can use the status bar ?


Narayan
 
Back
Top