Excel 2010
-----------------
I'm using this code to print user's accessing a file:
Private Sub Workbook_Open()
With Sheets("Sheet2")
lastrow = .Cells(Rows.Count, "A").End(xlUp).Row + 1
.Cells(lastrow, 1) = Environ("Username")
.Cells(lastrow, 1).Offset(, 1).Value = Now
End With
ActiveWorkbook.Save
End Sub
However as someone could just delete the printed user log in the Sheet2, and also you can't use this if you protect the sheet, which defeats the purpose.
I want it to print the log into a separate file. Can I add in the file path/name to this code somewhere?
Thanks
Bookmarks