Dear experts,
I would like to learn who has opened my excel file in the company where we use a network and every computer has a username?
I need a macro for this.
do you know one?
If you add this code to the ThisWorkbook module it will append records to a text file (log.txt" in the same path as the file is stored
It will write
System Log On, PC Name, Time
You can change the log file path, ie to write to z:\temp where z is a network drive
Open "z:\temp\usage.log" For Append As #1
Cheers
Dave
Private Sub Workbook_Open() Open ThisWorkbook.Path & "\log.txt" For Append As #1 Print #1, Environ("username"), Environ("computername"), Now Close #1End Sub
It will write
System Log On, PC Name, Time
You can change the log file path, ie to write to z:\temp where z is a network drive
Open "z:\temp\usage.log" For Append As #1
Cheers
Dave
Open in new window