Hello
I would like to keep an activity log of who opens my workbook and at what time.
Is it possible to write to a file (CSV preferably) the following information:
DATE, TIME, Windows Logon ID, Computer ID
Any help is greatly appreciated!
Hello
I would like to keep an activity log of who opens my workbook and at what time.
Is it possible to write to a file (CSV preferably) the following information:
DATE, TIME, Windows Logon ID, Computer ID
Any help is greatly appreciated!
If they enable macros then yes.
You would need to place a call to the logging routine in the Workbook_Open event.
The logging routine can use simple file I/O to add a record to the file
Thisworkbook code
Module code![]()
Private Sub Workbook_Open() LogOpen End Sub
You need to search the forum for details on getting the logon and computer id.![]()
Public Function LogOpen() Dim intUnit As Integer Dim strWindowsLogon As String Dim strComputerID As String Const LOG_FILE = "C:\temp\log.csv" intUnit = FreeFile Open LOG_FILE For Append As intUnit Write #intUnit, Now, strWindowsLogon, strComputerID Close intUnit End Function
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks