View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Creating a list of workbook users


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim i As Long
With Worksheets("hiiden sheet")
i = .Cells(.Rows.Count, "A").End(xlUp).Row
If i = 1 And .Range("A1").Value = "" Then
Else
i = i + 1
End If
.Range("A" & i).Value = Environ("UserName")
.Range("B" & i).Value = Format(Now, "dd mmm yyyy hh:mm:ss")
End With
End Sub


'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"bridgesmj" wrote in message
ups.com...
Hi, I've been thinking how to do this, but I'm not quite advanced
enough to crack it yet.

I'd like to create a macro that saves the user identity (preferrably
system logon ID, but User name from Options would suffice), and date
and time of closure to a hidden sheet in each workbook every time a
workbook is closed.

I'm having trouble with people mucking up my work and I want to know
who it is! A few people need access to edit them, so there's no
blocking them off - sorry if that was your other solution.

Thanks in advance for this.

Mark.