I use the below code to measure holw long people stay in a spreadsheet for. The only way i can make this work is by making the WB shared and having it saved on exit.
This is causing problems as people are making a mess of reports and leaving the WB like that.
Can anyone, think of a work around.
So i need to save so that i record what time they left, yet i dont want to save any of their changes, they should be allowed to edit the reports (they need to drill pivots etc) but i cant allow them to save the changes, yet i need to save to monitor!!!
Can anyone think of a way around this?
Dim R As Long
Dim t As Double
Private Sub Workbook_BeforeClose(Cancel As Boolean)
.Range("B64000").End(xlUp).Offset(0, 2) = Now()
Private Sub Workbook_Open()
.Range("B64000").End(xlUp).Offset(1, 0) = Environ("USERNAME")
.Range("B64000").End(xlUp).Offset(0, 1) = Now()
R = .Range("B" & Rows.Count).End(xlUp).Row
.Range("E2") = "=VLOOKUP(B2,$K$2:$L$5,2,0)"
.Range("F2") = "=INT(C2)"
.Range("G2") = "=MOD(C2,1)"
.Range("H2") = "=MOD(D2,1)"
.Range("I2") = "=H2-G2"
.Range("E2:I2").AutoFill Destination:=.Range("E2:I" & R), Type:=xlFillDefault
For Each objSht In ActiveWorkbook.Sheets
If objSht.Name <> "Screen" Then
objSht.Visible = xlSheetHidden