jei eusebio
Member
Hi Ninjas,
Used 2 vba codes from Hui ( which works perfectly :D ), that inserts username, date & time stamps .. but I encounter errors when I combined them to run on one sheet. I tried to use TODAY so that it would just show the Date without the time, but instead appears as blank. Need a little help.
Thanks in advance!
Used 2 vba codes from Hui ( which works perfectly :D ), that inserts username, date & time stamps .. but I encounter errors when I combined them to run on one sheet. I tried to use TODAY so that it would just show the Date without the time, but instead appears as blank. Need a little help.
Thanks in advance!
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
Dim changeRng As Range
Dim uName As String
Dim curTime As Date
Dim newMsg As String
If Target.Column = 2 Then
Cells(Target.Row, "C").Value = Today
Cells(Target.Row, "D").Value = Now
End If
Set changeRng = Intersect(Target, Range("B:B"))
If changeRng Is Nothing Then Exit Sub
Application.EnableEvents = False
On Error GoTo SafetyNet
uName = Application.UserName
curTime = Now
newMsg = uName
For Each c In changeRng.Cells
Cells(c.Row, "L").Value = newMsg
Next c
SafetyNet:
Application.EnableEvents = True
End Sub