ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how do i insert a real time clock in excel ? (https://www.excelbanter.com/excel-discussion-misc-queries/148124-how-do-i-insert-real-time-clock-excel.html)

daredevilzx9

how do i insert a real time clock in excel ?
 
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.


Gary''s Student

how do i insert a real time clock in excel ?
 
Start a timer when the workbook opens. When the timer expires, generate a
warning message. These are Event macros.

For event macros see:


http://www.mvps.org/dmcritchie/excel/event.htm


For timer macros see:

http://www.cpearson.com/excel/ontime.htm
--
Gary''s Student - gsnu200733


"daredevilzx9" wrote:

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.


MartinW

how do i insert a real time clock in excel ?
 
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

"daredevilzx9" wrote in message
...
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.




JB

how do i insert a real time clock in excel ?
 
Disconnect after inactivity:

http://boisgontierjacques.free.fr/fi...rmeInactif.xls
http://boisgontierjacques.free.fr/fi...eInactif2..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, Procedu="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, Procedu="Fin", Schedule:=False
ProchainArret
End Sub

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

JB
http://boisgontierjacques.free.fr/

On 27 juin, 11:46, daredevilzx9
wrote:
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.





All times are GMT +1. The time now is 04:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com