Good afternoon all,
I have a VBA code that i've taken from the web, that created a time stamp each time the excel file is opened, it takes the username, the date & time the file was opened, the problem is that this is all contained within a single cell,
Is it possible some one could amend the code so that:
- Username is contained within Column A
- Date is contained within Column B
- Time is contained within Column C.
Private Sub Workbook_Open()
'Run from ThisWorkbook module.
Dim myUser As String, UserName
UserName = Environ("UserName")
myUser = "User: " & UserName & _
", On: " & Application.WorksheetFunction.Text(Now(), "d/m/yyyy at hh:mm AM/PM")
Worksheets("Open History").Range("A65536").End(xlUp).Offset(1, 0).Value = myUser
ActiveWorkbook.Save
End Sub
Thank you very much for any replies.
NOTE: I have not attached an example workbook to this post as I do not think it would be necessary.
Bookmarks