Taras
asked on
excel concatenate text to date time stamp
I am using this code to put time stamp in cell B5:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
' The variable KeyCells contains the cells that will
' cause an alert when they are changed.
With Me
Set KeyCells = .Range("D5")
If Not Application.Intersect(KeyC ells, Target) Is Nothing Then
' we will put time stamp in cell B5
Application.EnableEvents = False
.Cells(5, "B").Value = Now()
.Cells(5, "B").NumberFormat = "m/d/yyyy h:mm AM/PM"
Application.EnableEvents = True
End If
End With
End Sub
It works ok however I need to concatenate "Run at: " to this time stamp.
Any idea.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
' The variable KeyCells contains the cells that will
' cause an alert when they are changed.
With Me
Set KeyCells = .Range("D5")
If Not Application.Intersect(KeyC
' we will put time stamp in cell B5
Application.EnableEvents = False
.Cells(5, "B").Value = Now()
.Cells(5, "B").NumberFormat = "m/d/yyyy h:mm AM/PM"
Application.EnableEvents = True
End If
End With
End Sub
It works ok however I need to concatenate "Run at: " to this time stamp.
Any idea.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you a lot.
Open in new window
With:
Open in new window