Hi! This is first my post here!
I am looking to create a template workbook for user acceptance testing (UAT) where I wish to have autopopulated on separate tables of the sheet (please see attached),
- the name of the first person (Tester A) opening the sheet and the date+time it was opened by them.
- the names and date+time of each person opening (Testers and Users) the sheet at any point of time.
Is this possible? How does one go about it?
P.S.: I have no idea about Excel programming as it is rarely, if at all, part of my work/student life, but I shall try my best. I'd appreciate any easier way to go about this that does not involve programming.
Cheers!
APPEND: I found this code in the forum here, but I can't get it to work due to the following error: (Error 9: Subscript Out Of Range)
Option Explicit
Private iNextRow As Long
Const HIDDEN_SHEET As String = "Sheet3"
Private Sub Workbook_Open()
With Worksheets(HIDDEN_SHEET)
.Range("A1").Value = Environ("UserName")
.Range("B1").Value = Format(Date + Time, _
"dd mmm yyyy hh:mm:ss")
End With
iNextRow = 2
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)
On Error GoTo wb_exit
Application.EnableEvents = False
If Sh.Name <> HIDDEN_SHEET Then
With Worksheets(HIDDEN_SHEET)
.Range("A" & iNextRow).Value = Environ("UserName")
.Range("B" & iNextRow).Value = Format(Date + Time, _
"dd mmm yyyy hh:mm:ss")
End With
End If
wb_exit:
Application.EnableEvents = True
End Sub
Bookmarks