Hi
Create an worksheet and name it p.e. 'Log'
Into cell A1 on Log enter text 'DateTime'
Into Cell B1 on Log enter text 'User'
Activate VBA editor, select sheet Log in VBA-Project window, and in
Properties window set sheet's Visible property to xlSheetVeryHidden
Create an workbooks Open event like
Private Sub Workbook_Open()
Dim LastRow As Long
LastROw = Sheets("Log").Range("A65000").End(xlUp).Row
Sheets("Log").Cells(LastRow + 1, 1).Value = Now
Sheets("Log").Cells(LastRow + 1, 2).Value = Application.UserName
End Sub
Protect your VBA-Project with password (right-click on project in VBAProject
window, select Properties from dropdown menu, and then activate Protection
tab).
Close VBA editor and save your workbook.
To view logs, you have to open VBA-Project window (you are asked for
password) and set sheet's Log Visible propertie to xlSheetVisible at first.
Or you can create links to sheet Log (you can have a special
password-protected workbook for this, where the log is mirrored).
NB! All this works when workbook isn't for shared use. With shared use all
will be more complex - started with retrieving user's name, and up to how to
write the log down when workbook is opened as read-only. Maybe someone more
experienced with such tasks can help you further.
Arvi Laanemets
Arvi Laanemets said:
Hi
Maybe tomorrow then - it's almost a hour past midnight here.
Arvi Laanemets