I have the following code in the sheet module which inserts a timestamp when certain values are changed. This gives me the date in m/dd/yyyy format. I want the format to be mm/dd/yy. I have formatted a number in VBA but can't get it right with the date. A solution would be appreciated.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
Set KeyCells = Range("E3:F500,M3:M14")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
Range("I16").Value = "Account Summary " & Date
End If
End Sub
Bookmarks