Darkvile
05-08-2012, 04:24 AM
:banghead:
I'm trying to record users who access excel documents.
However instead of recording the data in a seperate sheet in the same workbook, i want the data to log in a completely different workbook.
Is this possible?
The code i have as my starting point is:
Private Sub Workbook_Open()
Sheets("Access log").Activate
If Range("A1").Value = "" Then
n = 1
Else
n = Cells(Rows.Count, "A").End(xlUp).Row + 1
End If
Cells(n, "A").Value = Environ("username")
Cells(n, "b").Value = Date
Cells(n, "c").Value = Time
ActiveWorkbook.Save
Sheets("Access log").Activate
End Sub
Any help would be appreciated!:bug:
I'm trying to record users who access excel documents.
However instead of recording the data in a seperate sheet in the same workbook, i want the data to log in a completely different workbook.
Is this possible?
The code i have as my starting point is:
Private Sub Workbook_Open()
Sheets("Access log").Activate
If Range("A1").Value = "" Then
n = 1
Else
n = Cells(Rows.Count, "A").End(xlUp).Row + 1
End If
Cells(n, "A").Value = Environ("username")
Cells(n, "b").Value = Date
Cells(n, "c").Value = Time
ActiveWorkbook.Save
Sheets("Access log").Activate
End Sub
Any help would be appreciated!:bug: