LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default 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.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change EXCEL Clock to Standard Clock or Military Time YoMarie Excel Worksheet Functions 4 April 29th 07 08:39 PM
Convert real time to a % in Excel barry Excel Discussion (Misc queries) 1 August 1st 06 10:25 AM
can excel be a time clock or stop watch? Anthony Reynard Chinnis New Users to Excel 1 February 15th 06 06:51 AM
Calculating Clock start time in Excel Hani Muhtadi Excel Discussion (Misc queries) 1 August 31st 05 10:01 PM
How do I insert a clock in excel worksheet? Vishal Excel Worksheet Functions 1 May 9th 05 03:03 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"