Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 49956

AuditLog Issues

$
0
0
New to the forum. Forgive me if I jack up the code posting. I'm trying to fix my macro to run an audit log (originally found on this website). It'll log the name and timestamp if I hit F5 in the module, but will not log it in by itself. Any thoughts?

Private Sub Workbook_Open()
Dim NR As Long

With Sheets("AuditLog")
NR = .Range("A" & .Rows.Count).End(xlUp).Row + 1
.Range("A" & NR).Value = Environ("Username")
.Range("B" & NR).Value = Now
End With

ThisWorkbook.Save

End Sub

Viewing all articles
Browse latest Browse all 49956

Trending Articles