how do i insert a real time clock in excel ?

D

daredevilzx9

I want to build a feature in Excel 2003 which gives a warning if somebody has
the sheet opened longer than a certain time, we are sharing a planning in
Excel, and sometimes a colleague keeps the sheet opened for a long time
without working with it .
other suggestions to solve this are also welcome.
 
M

MartinW

Staff Training!!
And impose fun fines for breaches of protocol.

That might sound flippant but I have actually used it
with very good results.

The problem is human based, not computer based.
If you address it with a computer based solution
you will just further frustrate people who are already frustrated.

Regards
Martin
 
J

JB

Disconnect after inactivity:

http://boisgontierjacques.free.fr/fichiers/Evenementiel/OnTimeFermeInactif.xls
http://boisgontierjacques.free.fr/fichiers/Evenementiel/OnTimeFermeInactif2..xls


In a module:

Public HeureArrêt
Sub ProchainArret()
HeureArrêt = Now + TimeValue("00:01:00")
Application.OnTime HeureArrêt, "Fin"
End Sub

Sub Fin()
On Error Resume Next
Application.OnTime HeureArrêt, Procedure:="Fin", Schedule:=False
'annule événnement
ThisWorkbook.Close True
End Sub

In ThisWorkBook:

Private Sub Workbook_Open()
ProchainArret
End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
Target As Range)
On Error Resume Next
Application.OnTime HeureArrêt, Procedure:="Fin", Schedule:=False
ProchainArret
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Save
On Error Resume Next
Application.OnTime HeureArrêt, Procedure:="Fin", Schedule:=False
End Sub

JB
http://boisgontierjacques.free.fr/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top